cleanup
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
};
|
};
|
||||||
principals = lib.mkOption {
|
principals = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
# default = [ ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|||||||
@@ -84,9 +84,12 @@ let
|
|||||||
systemctlArgs ? [ ],
|
systemctlArgs ? [ ],
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||||
|
escapedArgs = lib.escapeShellArgs systemctlArgs;
|
||||||
|
systemctlCommand = "${systemctl} ${escapedArgs}";
|
||||||
renewReloadScript = lib.concatMapStringsSep "\n" (unit: ''
|
renewReloadScript = lib.concatMapStringsSep "\n" (unit: ''
|
||||||
if ${lib.getExe' pkgs.systemd "systemctl"} ${lib.escapeShellArgs systemctlArgs} --quiet is-active "${unit}"; then
|
if ${systemctlCommand} --quiet is-active "${unit}"; then
|
||||||
${lib.getExe' pkgs.systemd "systemctl"} ${lib.escapeShellArgs systemctlArgs} try-reload-or-restart "${unit}"
|
${systemctlCommand} try-reload-or-restart "${unit}"
|
||||||
fi
|
fi
|
||||||
'') reloadUnits;
|
'') reloadUnits;
|
||||||
renewPostCommands = lib.concatStringsSep "\n" postCommands;
|
renewPostCommands = lib.concatStringsSep "\n" postCommands;
|
||||||
|
|||||||
Reference in New Issue
Block a user