about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--machines/srv3/configuration.nix11
-rw-r--r--machines/srv3/hardware-configuration.nix12
-rw-r--r--machines/srv3/services/cgit/baby-yoda.png (renamed from machines/srv3/baby-yoda.png)bin957567 -> 957567 bytes
-rw-r--r--machines/srv3/services/cgit/baby-yoda.png.comp (renamed from machines/srv3/baby-yoda.png.comp)bin7710 -> 7710 bytes
-rw-r--r--machines/srv3/services/cgit/default.nix (renamed from machines/srv3/cgit.nix)0
-rw-r--r--machines/srv3/services/webdav/default.nix47
-rw-r--r--machines/srv3/webdav.nix33
-rw-r--r--modules/gnome.nix1
8 files changed, 68 insertions, 36 deletions
diff --git a/machines/srv3/configuration.nix b/machines/srv3/configuration.nix
index ae54e48..7187e4a 100644
--- a/machines/srv3/configuration.nix
+++ b/machines/srv3/configuration.nix
@@ -13,17 +13,22 @@ in
       ../../modules/obsidian-livesync.nix
       ./home-assistant.nix
       ./hardware-configuration.nix
-      ./webdav.nix
-      ./cgit.nix
+      ./services/webdav
+      ./services/cgit
       ./noip.nix
     ];
 
     services.obsidian-livesync = {
-    	enable = true;
+    	enable = false;
 	domain = "obsidian.${domain}";
 	adminsFile = "/etc/couchdb.ini";
     };
 
+    services.srv3-webdav = {
+    	enable = true;
+    	domain = "files.${domain}";
+    };
+
     boot.loader.grub.enable = true;
     boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
 
diff --git a/machines/srv3/hardware-configuration.nix b/machines/srv3/hardware-configuration.nix
index ced039c..e1b0dba 100644
--- a/machines/srv3/hardware-configuration.nix
+++ b/machines/srv3/hardware-configuration.nix
@@ -13,6 +13,18 @@
   boot.kernelModules = [ "kvm-intel" ];
   boot.extraModulePackages = [ ];
 
+  fileSystems."/data" = {
+    device = "/dev/disk/by-uuid/f5a131d0-aaec-4129-8f46-9136abef4f1a";
+    fsType = "btrfs";
+    options = [ "subvol=data" ];
+  };
+
+  fileSystems."/snapshots" = {
+    device = "/dev/disk/by-uuid/f5a131d0-aaec-4129-8f46-9136abef4f1a";
+    fsType = "btrfs";
+    options = [ "subvol=snapshots" ];
+  };
+
   fileSystems."/" =
     { device = "/dev/disk/by-uuid/6be0c826-51c9-40dd-9210-6d79f329e6e6";
       fsType = "ext4";
diff --git a/machines/srv3/baby-yoda.png b/machines/srv3/services/cgit/baby-yoda.png
index 42a200c..42a200c 100644
--- a/machines/srv3/baby-yoda.png
+++ b/machines/srv3/services/cgit/baby-yoda.png
Binary files differdiff --git a/machines/srv3/baby-yoda.png.comp b/machines/srv3/services/cgit/baby-yoda.png.comp
index 26eb247..26eb247 100644
--- a/machines/srv3/baby-yoda.png.comp
+++ b/machines/srv3/services/cgit/baby-yoda.png.comp
Binary files differdiff --git a/machines/srv3/cgit.nix b/machines/srv3/services/cgit/default.nix
index bcd63bb..bcd63bb 100644
--- a/machines/srv3/cgit.nix
+++ b/machines/srv3/services/cgit/default.nix
diff --git a/machines/srv3/services/webdav/default.nix b/machines/srv3/services/webdav/default.nix
new file mode 100644
index 0000000..e184490
--- /dev/null
+++ b/machines/srv3/services/webdav/default.nix
@@ -0,0 +1,47 @@
+{ config, lib, ... }:
+let
+cfg = config.services.srv3-webdav;
+in
+{
+
+	options = {
+		services.srv3-webdav = {
+			enable = lib.mkEnableOption "WebDav server";
+
+			domain = lib.mkOption {
+				type = lib.types.str;
+				description = "Where webdav server should live";
+			};
+
+			port = lib.mkOption {
+				type = lib.types.number;
+				default = 6060;
+# FIX: Hardening reverse proxy
+				description = "Internal port on which webdav server will run";
+			};
+			
+			configFile = lib.mkOption {
+				type = lib.types.path;
+				default = "/etc/webdav.yaml";
+				description = "WebDav server config file";
+			};
+		};
+
+	};
+	config = lib.mkIf cfg.enable {
+		services.nginx.virtualHosts.${cfg.domain} = {
+			forceSSL = true;
+			enableACME = true;
+
+			locations."/" = {
+				proxyPass = "http://localhost:${toString cfg.port}";
+			};
+		};
+
+		services.webdav = {
+			enable = true;
+			configFile = cfg.configFile;
+		};
+	};
+
+}
diff --git a/machines/srv3/webdav.nix b/machines/srv3/webdav.nix
deleted file mode 100644
index 9a4c126..0000000
--- a/machines/srv3/webdav.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ pkgs, ... }:
-let
-	port = "6060";
-in
-{
-	services.nginx.virtualHosts."files.niedzwiedzinski.cyou" = {
-		forceSSL = true;
-		enableACME = true;
-
-		locations."/" = {
-			proxyPass = "http://localhost:${port}";
-		};
-	};
-
-	services.webdav = {
-		enable = true;
-		configFile = "/etc/webdav.yaml";
-		#settings = {
-			#address = "0.0.0.0";
-			#port = port;
-			#scope = "/srv/files";
-			#modify = true;
-			#auth = true;
-			#users = [
-			#{
-				#username = "patryk";
-				#password = "test";
-			#}
-			#];
-		#};
-	};
-
-}
diff --git a/modules/gnome.nix b/modules/gnome.nix
index 81385f7..0600c80 100644
--- a/modules/gnome.nix
+++ b/modules/gnome.nix
@@ -131,6 +131,7 @@ in
 		vlc
 		wl-clipboard
 		mousai
+		gnome-frog
 	];
 
 	fonts.packages = with pkgs; [