summaryrefslogtreecommitdiff
path: root/pkgs/lib/home-manager
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/home-manager')
-rw-r--r--pkgs/lib/home-manager/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/lib/home-manager/default.nix b/pkgs/lib/home-manager/default.nix
new file mode 100644
index 0000000..62db998
--- /dev/null
+++ b/pkgs/lib/home-manager/default.nix
@@ -0,0 +1,11 @@
+{ }:
+
+{
+ 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"; };
+ };
+ };
+}