mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
Rename suspendService to dependentService
This commit is contained in:
parent
5481b8f82a
commit
731f0ec615
5 changed files with 10 additions and 10 deletions
|
|
@ -16,7 +16,7 @@ in
|
|||
type = lib.types.str;
|
||||
default = config.users.users.root.name;
|
||||
};
|
||||
suspendService = lib.mkOption {
|
||||
dependentService = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.nonEmptyStr;
|
||||
default = null;
|
||||
};
|
||||
|
|
@ -83,11 +83,11 @@ in
|
|||
|> lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "restic-backups-${name}" (
|
||||
lib.mkIf (value.suspendService != null) {
|
||||
unitConfig.Conflicts = [ value.suspendService ];
|
||||
after = [ value.suspendService ];
|
||||
onSuccess = [ value.suspendService ];
|
||||
onFailure = [ value.suspendService ];
|
||||
lib.mkIf (value.dependentService != null) {
|
||||
unitConfig.Conflicts = [ value.dependentService ];
|
||||
after = [ value.dependentService ];
|
||||
onSuccess = [ value.dependentService ];
|
||||
onFailure = [ value.dependentService ];
|
||||
}
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue