Browse Source

Add the `services` option to the `backup.scripts` module

master
Peter J. Jones 3 months ago
parent
commit
899b1db967
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      modules/backup/script.nix

+ 11
- 1
modules/backup/script.nix View File

@@ -52,6 +52,16 @@ let
available.
'';
};

services = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "foo.service" ];
description = ''
Extra services to require and wait for. Useful if you want
to require certain systemd mounts to exist.
'';
};
};

config = {
@@ -64,7 +74,7 @@ let
service = opts: rec {
description = "${opts.name} backup";
path = [ pkgs.coreutils ] ++ opts.path;
wants = plib.keyService opts.key;
wants = plib.keyService opts.key ++ opts.services;
after = wants;
script = opts.script;
serviceConfig.Type = "simple";

Loading…
Cancel
Save