summary refs log tree commit diff
path: root/nixos
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
parenta2b718fc80c58caf525f1a867ed127f1cf7c0e1b (diff)
downloadnixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.gz
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.bz2
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.lz
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.xz
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.tar.zst
nixpkgs-57f7798b51b9bf775f22428d70b1dca0b01cf032.zip
also generate startAt timers for systemd user units
Diffstat (limited to 'nixos')
-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 1314b727772..05369da4f16 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";