Fix wol
This commit is contained in:
parent
cb0a071ee6
commit
7f3441fc76
4 changed files with 54 additions and 13 deletions
|
@ -1,24 +1,38 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# For unlocking the disk connect using ssh and type
|
||||
# systemctl start initrd-nixos-activation
|
||||
boot.initrd = {
|
||||
network = {
|
||||
enable = true;
|
||||
ssh = {
|
||||
enable = true;
|
||||
ignoreEmptyHostKeys = true;
|
||||
extraConfig = ''
|
||||
HostKey /ssh_initrd_host_ed25519_key
|
||||
'';
|
||||
authorizedKeys = with (import ../../lib).keys.users; [
|
||||
ccr-gpg
|
||||
ccr-ssh
|
||||
];
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
storePaths = ["${config.programs.ssh.package}/bin/ssh-keygen"];
|
||||
network.enable = true;
|
||||
storePaths = [
|
||||
"${config.programs.ssh.package}/bin/ssh-keygen"
|
||||
"${pkgs.bashInteractive}/bin/bash"
|
||||
];
|
||||
services.sshd.preStart = ''
|
||||
${config.programs.ssh.package}/bin/ssh-keygen -t ed25519 -N "" -f /ssh_initrd_host_ed25519_key
|
||||
[ ! -f /ssh_initrd_host_ed25519_key ] && ${config.programs.ssh.package}/bin/ssh-keygen -t ed25519 -N "" -f /ssh_initrd_host_ed25519_key
|
||||
chmod 600 /ssh_initrd_host_ed25519_key
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.systemd.additionalUpstreamUnits = ["debug-shell.service"];
|
||||
boot.kernelParams = ["rd.systemd.debug_shell"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue