about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/server/navidrome.nix24
-rw-r--r--hosts/roles/music-server.nix31
-rw-r--r--hosts/tahoe/default.nix6
3 files changed, 26 insertions, 35 deletions
diff --git a/hosts/common/server/navidrome.nix b/hosts/common/server/navidrome.nix
new file mode 100644
index 0000000..e37ccfe
--- /dev/null
+++ b/hosts/common/server/navidrome.nix
@@ -0,0 +1,24 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.navidrome = {
+    enable = true;
+    settings = {
+      MusicFolder = "/data/fast/music";
+      Address = "0.0.0.0";
+      httpPort = "4533";
+    };
+  };
+
+  services.restic.backups = {
+    navidrome = {
+      paths = [ "/var/lib/navidrome/" ];
+      repository = "/data/slow/backups/systems";
+      passwordFile = config.age.secrets.restic-repo-systems.path;
+      timerConfig = { OnCalendar = "00:35"; };
+      initialize = true;
+      extraBackupArgs = [ "--tag navidrome" ];
+      pruneOpts = [ "--keep-daily 7" "--keep-weekly 4 --keep-monthly 6" ];
+    };
+  };
+}
diff --git a/hosts/roles/music-server.nix b/hosts/roles/music-server.nix
deleted file mode 100644
index 0b41b05..0000000
--- a/hosts/roles/music-server.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, pkgs, lib, ... }:
-let cfg = config.my.roles.music-server;
-
-in {
-  options.my.roles.music-server = {
-    enable = lib.mkEnableOption "Music server";
-  };
-
-  config = lib.mkIf cfg.enable {
-    services.navidrome = {
-      enable = true;
-      settings = {
-        MusicFolder = "/data/fast/music";
-        Address = "0.0.0.0";
-        httpPort = "4533";
-      };
-    };
-
-    services.restic.backups = {
-      navidrome = {
-        paths = [ "/var/lib/navidrome/" ];
-        repository = "/data/slow/backups/systems";
-        passwordFile = config.age.secrets.restic-repo-systems.path;
-        timerConfig = { OnCalendar = "00:35"; };
-        initialize = true;
-        extraBackupArgs = [ "--tag navidrome" ];
-        pruneOpts = [ "--keep-daily 7" "--keep-weekly 4 --keep-monthly 6" ];
-      };
-    };
-  };
-}
diff --git a/hosts/tahoe/default.nix b/hosts/tahoe/default.nix
index 9e41ed2..5a746dd 100644
--- a/hosts/tahoe/default.nix
+++ b/hosts/tahoe/default.nix
@@ -1,6 +1,6 @@
 { config, pkgs, hostname, ... }:
-let my = import ../roles;
-in {
+
+{
   imports = [ # Include the results of the hardware scan.
     ./hardware-configuration.nix
     ../profiles/nas.nix
@@ -25,8 +25,6 @@ in {
     };
   };
 
-  my.roles = { music-server.enable = true; };
-
   networking.private-wireguard.enable = true;
   networking.firewall.enable = false;