mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 05:18:44 +08:00
system.initrd: Enable sulogin on boot failure
This commit is contained in:
parent
76414e846e
commit
5c9774e906
@ -12,22 +12,18 @@ inputs:
|
||||
};
|
||||
};
|
||||
};
|
||||
config =
|
||||
let
|
||||
inherit (inputs.config.nixos.system) initrd;
|
||||
inherit (inputs.lib) mkIf mkMerge;
|
||||
in mkMerge
|
||||
[
|
||||
{ boot.initrd.systemd.enable = true; }
|
||||
(
|
||||
mkIf (initrd.sshd.enable)
|
||||
config = let inherit (inputs.config.nixos.system) initrd; in inputs.lib.mkMerge
|
||||
[
|
||||
{ boot.initrd.systemd.enable = true; }
|
||||
(
|
||||
inputs.lib.mkIf (initrd.sshd.enable)
|
||||
{
|
||||
boot =
|
||||
{
|
||||
boot =
|
||||
{
|
||||
initrd.network = { enable = true; ssh = { enable = true; hostKeys = initrd.sshd.hostKeys; }; };
|
||||
kernelParams = [ "ip=dhcp" ];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
initrd.network = { enable = true; ssh = { enable = true; hostKeys = initrd.sshd.hostKeys; }; };
|
||||
kernelParams = [ "ip=dhcp" "boot.shell_on_fail" "systemd.setenv=SYSTEMD_SULOGIN_FORCE=1" ];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user