Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
42 lines
866 B
Nix
42 lines
866 B
Nix
{
|
|
config,
|
|
lib,
|
|
options,
|
|
...
|
|
}:
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
systemd.enableEmergencyMode = lib.mkOption {
|
|
default = true;
|
|
type = lib.types.bool;
|
|
description = ''
|
|
Whether to enable emergency mode, which is an
|
|
{command}`sulogin` shell started on the console if
|
|
mounting a filesystem fails. Since some machines (like EC2
|
|
instances) have no console of any kind, emergency mode doesn't
|
|
make sense, and it's better to continue with the boot insofar
|
|
as possible.
|
|
|
|
For initrd emergency access, use ${options.boot.initrd.systemd.emergencyAccess} instead.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = {
|
|
|
|
systemd.additionalUpstreamSystemUnits = lib.optionals config.systemd.enableEmergencyMode [
|
|
"emergency.target"
|
|
"emergency.service"
|
|
];
|
|
|
|
};
|
|
|
|
}
|