diff options
Diffstat (limited to 'home/pkgs')
| -rw-r--r-- | home/pkgs/lib/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/home/pkgs/lib/default.nix b/home/pkgs/lib/default.nix new file mode 100644 index 0000000..55e6c20 --- /dev/null +++ b/home/pkgs/lib/default.nix @@ -0,0 +1,11 @@ +{ pkgs }: + +{ + serviceWithTimer = name: { Unit, Service, Timer, Install, ... }@config: { + services.${name} = { inherit (config) Unit Install Service; }; + timers.${name} = { + inherit (config) Unit Install; + Timer = config.Timer // { Unit = "${name}.service"; }; + }; + }; +} |
