systemd: make ctrl-alt-del target configurable. (#16911)
We currently only allow upstream's default of "reboot.target" due to the way the symlinks are initialized. I made this configurable similar to the default unit.
This commit is contained in:
parent
a6e3a53229
commit
3530f3f20a
|
@ -176,7 +176,7 @@ rec {
|
||||||
${optionalString (type == "system") ''
|
${optionalString (type == "system") ''
|
||||||
# Stupid misc. symlinks.
|
# Stupid misc. symlinks.
|
||||||
ln -s ${cfg.defaultUnit} $out/default.target
|
ln -s ${cfg.defaultUnit} $out/default.target
|
||||||
|
ln -s ${cfg.ctrlAltDelUnit} $out/ctrl-alt-del.target
|
||||||
ln -s rescue.target $out/kbrequest.target
|
ln -s rescue.target $out/kbrequest.target
|
||||||
|
|
||||||
mkdir -p $out/getty.target.wants/
|
mkdir -p $out/getty.target.wants/
|
||||||
|
|
|
@ -120,7 +120,6 @@ let
|
||||||
"systemd-poweroff.service"
|
"systemd-poweroff.service"
|
||||||
"halt.target"
|
"halt.target"
|
||||||
"systemd-halt.service"
|
"systemd-halt.service"
|
||||||
"ctrl-alt-del.target"
|
|
||||||
"shutdown.target"
|
"shutdown.target"
|
||||||
"umount.target"
|
"umount.target"
|
||||||
"final.target"
|
"final.target"
|
||||||
|
@ -162,7 +161,6 @@ let
|
||||||
"systemd-hostnamed.service"
|
"systemd-hostnamed.service"
|
||||||
"systemd-binfmt.service"
|
"systemd-binfmt.service"
|
||||||
]
|
]
|
||||||
|
|
||||||
++ cfg.additionalUpstreamSystemUnits;
|
++ cfg.additionalUpstreamSystemUnits;
|
||||||
|
|
||||||
upstreamSystemWants =
|
upstreamSystemWants =
|
||||||
|
@ -485,6 +483,15 @@ in
|
||||||
description = "Default unit started when the system boots.";
|
description = "Default unit started when the system boots.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.ctrlAltDelUnit = mkOption {
|
||||||
|
default = "reboot.target";
|
||||||
|
type = types.str;
|
||||||
|
example = "poweroff.target";
|
||||||
|
description = ''
|
||||||
|
Target that should be started when Ctrl-Alt-Delete is pressed.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
systemd.globalEnvironment = mkOption {
|
systemd.globalEnvironment = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user