Rename suspendService to dependentService

This commit is contained in:
SebastianStork 2025-06-07 13:57:40 +02:00
parent 5481b8f82a
commit 731f0ec615
5 changed files with 10 additions and 10 deletions

View file

@ -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 ];
}
)
);