about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-28 09:24:44 -0700
committerFranck Cuny <franck@fcuny.net>2022-03-28 09:24:44 -0700
commit8a103d3a1aa34e4a04fc633378e352cf5b6911ef (patch)
tree126f39229e07a0c5e498f56fb025723d8cadb3fa /hosts
parentnas: bind navidrome to all interfaces (diff)
downloadworld-8a103d3a1aa34e4a04fc633378e352cf5b6911ef.tar.gz
nas: backup navidrome data and add music subdomain
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/server/navidrome.nix13
-rw-r--r--hosts/common/server/traefik.nix1
2 files changed, 14 insertions, 0 deletions
diff --git a/hosts/common/server/navidrome.nix b/hosts/common/server/navidrome.nix
index 624a1b1..e37ccfe 100644
--- a/hosts/common/server/navidrome.nix
+++ b/hosts/common/server/navidrome.nix
@@ -6,6 +6,19 @@
     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/common/server/traefik.nix b/hosts/common/server/traefik.nix
index 635560d..2b52c1f 100644
--- a/hosts/common/server/traefik.nix
+++ b/hosts/common/server/traefik.nix
@@ -82,6 +82,7 @@ in {
     (mkServiceConfig "dash" "http://127.0.0.1:3000/" domainPrivate "le-dns")
     (mkServiceConfig "bt" "http://127.0.0.1:9091/" domainPrivate "le-dns")
     (mkServiceConfig "unifi" "https://127.0.0.1:8443/" domainPrivate "le-dns")
+    (mkServiceConfig "music" "http://127.0.0.1:4533/" domainPrivate "le-dns")
     (mkServiceConfig "git" "http://127.0.0.1:8002/" domainPrivate "le-dns")
     (mkServiceConfig "git" "http://127.0.0.1:8002/" domainPublic "le-http")
   ];