summaryrefslogtreecommitdiff
path: root/pkgs/lib/home-manager/default.nix
blob: e07e0b8fe43f97d40f7ac2386b2925befbd55caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ }:

{
  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";
        };
      };
    };
}