summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAnders Papitto <anderspapitto@gmail.com>2015-08-20 23:45:13 -0700
committerAnders Papitto <anderspapitto@gmail.com>2015-08-20 23:46:08 -0700
commit57f7798b51b9bf775f22428d70b1dca0b01cf032 (patch)
tree59981be4385a8e38a172ee17bc18129ec41db847 /nixos/modules
parenta2b718fc80c58caf525f1a867ed127f1cf7c0e1b (diff)
downloadnixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.gz
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.bz2
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.lz
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.xz
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.zst
nixlib-57f7798b51b9bf775f22428d70b1dca0b01cf032.zip
also generate startAt timers for systemd user units
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/system/boot/systemd.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 1314b7277723..05369da4f16b 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -713,6 +713,14 @@ in
         })
         (filterAttrs (name: service: service.startAt != "") cfg.services);
 
+    # Generate timer units for all services that have a ‘startAt’ value.
+    systemd.user.timers =
+      mapAttrs (name: service:
+        { wantedBy = [ "timers.target" ];
+          timerConfig.OnCalendar = service.startAt;
+        })
+        (filterAttrs (name: service: service.startAt != "") cfg.user.services);
+
     systemd.sockets.systemd-journal-gatewayd.wantedBy =
       optional config.services.journald.enableHttpGateway "sockets.target";