summaryrefslogtreecommitdiff
path: root/pkgs/lib/home-manager/default.nix
blob: 91149d6c748a2348168f0395b6bc2adc97a1e43f (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 Service; };
      timers.${name} = {
        inherit (config) Unit Install;
        Timer = config.Timer // {
          Unit = "${name}.service";
        };
      };
    };
}