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