]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/system/monitoring-1.nix
Use attrs for secrets instead of lists
[perso/Immae/Config/Nix.git] / modules / private / system / monitoring-1.nix
index 91d30fdbb7b31111924d89826e8db80c2ebdf11e..dea5f45993daf1f31e896172933c7ba214e89bdf 100644 (file)
@@ -45,9 +45,8 @@
   networking.firewall.allowedTCPPorts = [ 19999 ];
   environment.etc."netdata/stream.conf".source = config.secrets.fullPaths."netdata-stream.conf";
 
-  secrets.keys = [
-    {
-      dest = "netdata-stream.conf";
+  secrets.keys = {
+    "netdata-stream.conf" = {
       user = config.services.netdata.user;
       group = config.services.netdata.group;
       permissions = "0400";
@@ -58,8 +57,8 @@
             default memory = ram
             health enabled by default = auto
       '') config.myEnv.monitoring.netdata_keys);
-    }
-  ];
+    };
+  };
   users.users."${config.services.netdata.user}".extraGroups = [ "keys" ];
   # This value determines the NixOS release with which your system is
   # to be compatible, in order to avoid breaking some software such as