about summary refs log tree commit diff
path: root/nixos/modules/services/scheduling
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2019-09-14 19:51:29 +0200
committerworldofpeace <worldofpeace@protonmail.ch>2020-01-06 10:39:18 -0500
commit1d61efb7f177f7b70c467ab4940fde0a3481d4dc (patch)
tree860cce85acd87bc07aa2d11f4feac5d0df48a5c0 /nixos/modules/services/scheduling
parent6bd13ccd8e7fd1f241eb655f7112df1ed2889a3a (diff)
treewide: use attrs instead of list for types.loaOf options
Diffstat (limited to 'nixos/modules/services/scheduling')
-rw-r--r--nixos/modules/services/scheduling/atd.nix10
-rw-r--r--nixos/modules/services/scheduling/fcron.nix5
2 files changed, 6 insertions, 9 deletions
diff --git a/nixos/modules/services/scheduling/atd.nix b/nixos/modules/services/scheduling/atd.nix
index a32907647a0d5..93ed9231d3c51 100644
--- a/nixos/modules/services/scheduling/atd.nix
+++ b/nixos/modules/services/scheduling/atd.nix
@@ -57,17 +57,13 @@ in
 
     security.pam.services.atd = {};
 
-    users.users = singleton
-      { name = "atd";
-        uid = config.ids.uids.atd;
+    users.users.atd =
+      { uid = config.ids.uids.atd;
         description = "atd user";
         home = "/var/empty";
       };
 
-    users.groups = singleton
-      { name = "atd";
-        gid = config.ids.gids.atd;
-      };
+    users.groups.atd.gid = config.ids.gids.atd;
 
     systemd.services.atd = {
       description = "Job Execution Daemon (atd)";
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index e43ca014e148a..42bed21bf25bd 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -86,7 +86,8 @@ in
 
     services.fcron.systab = systemCronJobs;
 
-    environment.etc =
+    environment.etc = listToAttrs
+      (map (x: { name = x.target; value = x; })
       [ (allowdeny "allow" (cfg.allow))
         (allowdeny "deny" cfg.deny)
         # see man 5 fcron.conf
@@ -112,7 +113,7 @@ in
           gid = config.ids.gids.fcron;
           mode = "0644";
         }
-      ];
+      ]);
 
     environment.systemPackages = [ pkgs.fcron ];
     users.users.fcron = {