]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/commento/default.nix
Use attrs for secrets instead of lists
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / commento / default.nix
index d0e7d2457a7328954784975e8f1765d7bfc5f1d7..c36255b63e487c66b3c7701411df2aa5b7c92f1a 100644 (file)
@@ -12,10 +12,9 @@ in
     enable = lib.mkEnableOption "Enable commento website";
   };
   config = lib.mkIf cfg.enable {
-    secrets.keys = [
-      {
-        dest = "commento/env";
-        permission = "0400";
+    secrets.keys = {
+      "commento/env" = {
+        permissions = "0400";
         text = ''
           COMMENTO_ORIGIN=https://commento.immae.eu/
           COMMENTO_PORT=${port}
@@ -29,8 +28,8 @@ in
           COMMENTO_SMTP_PASSWORD=${env.smtp.password}
           COMMENTO_SMTP_FROM_ADDRESS=${env.smtp.email}
         '';
-      }
-    ];
+      };
+    };
 
     services.websites.env.tools.vhostConfs.commento = {
       certName = "eldiron";