server10: initrd systemd
This commit is contained in:
parent
ce83d387e2
commit
fe4ba991a5
|
@ -13,6 +13,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
initrd.availableKernelModules = [ "e1000e" ];
|
||||||
loader.grub = lib.mkIf (!options?isoImage) {
|
loader.grub = lib.mkIf (!options?isoImage) {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
|
|
|
@ -15,22 +15,33 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.network = {
|
initrd = {
|
||||||
enable = true;
|
# make sure to set availableKernelModules otherwise it won't work!
|
||||||
ssh = {
|
# the module can be found in a booted system by running `dmesg | rg "Link"` and looking at the first word after the date
|
||||||
|
network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
ssh = {
|
||||||
hostKeys = [
|
enable = true;
|
||||||
initrdEd2219Key
|
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||||
initrdRsaKey
|
hostKeys = [
|
||||||
];
|
initrdEd2219Key
|
||||||
port = 4748;
|
initrdRsaKey
|
||||||
|
];
|
||||||
|
port = 4748;
|
||||||
|
};
|
||||||
|
postCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
|
||||||
|
cat <<EOF > /root/.profile
|
||||||
|
cryptsetup-askpass
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
inherit (config.systemd) network;
|
||||||
|
contents."/etc/profile".text = ''
|
||||||
|
systemd-tty-ask-password-agent
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
postCommands = ''
|
|
||||||
cat <<EOF > /root/.profile
|
|
||||||
cryptsetup-askpass
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
# "boot.shell_on_fail"
|
# "boot.shell_on_fail"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user