From 57f7798b51b9bf775f22428d70b1dca0b01cf032 Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Thu, 20 Aug 2015 23:45:13 -0700 Subject: [PATCH] also generate startAt timers for systemd user units --- nixos/modules/system/boot/systemd.nix | 8 ++++++++ 1 file changed, 8 insertions(+) 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";