diff --git a/flake.nix b/flake.nix index e31ef88..82a15db 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,8 @@ HOME = cfg.home; DATABASE = "database.db"; }; + + service_name = script: lib.strings.sanitizeDerivationName("${cfg.user}@${script}"); # oneshot scripts to run serviceGenerator = mapAttrs' (script: time: nameValuePair (service_name script) { @@ -206,7 +208,11 @@ ]; }; }; - }; + } // serviceGenerator scripts; + + # timers to run the above services + systemd.timers = timerGenerator scripts; + }; }; }