]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/mpd/default.nix
Move ssh ftp and mpd to new secrets
[perso/Immae/Config/Nix.git] / nixops / modules / mpd / default.nix
index 2cf37adfe6b9be5fd8e840495daaf32c0d6ab4bd..09047329ba2bb1332fdfa3bd95553fd3ebefe7de 100644 (file)
@@ -4,20 +4,22 @@
     nixpkgs.overlays = [ (self: super: rec {
       mpd = (self.callPackage ./mpd.nix {}).mpd;
     }) ];
-    deployment.keys = {
-      mpd = {
+    mySecrets.keys = [
+      {
+        dest = "mpd";
         permissions = "0400";
         text = myconfig.env.mpd.password;
-      };
-      mpd-config = {
+      }
+      {
+        dest = "mpd-config";
         permissions = "0400";
         user = "mpd";
         group = "mpd";
         text = ''
           password "${myconfig.env.mpd.password}@read,add,control,admin"
         '';
-      };
-    };
+      }
+    ];
     networking.firewall.allowedTCPPorts = [ 6600 ];
     users.users.mpd.extraGroups = [ "wwwrun" "keys" ];
     system.activationScripts.mpd = ''
@@ -28,7 +30,7 @@
       network.listenAddress = "any";
       musicDirectory = myconfig.env.mpd.folder;
       extraConfig = ''
-        include "/run/keys/mpd-config"
+        include "/var/secrets/mpd-config"
         audio_output {
           type            "null"
           name            "No Output"