magpie: add ssh service to initrd

This commit is contained in:
2024-04-21 13:53:46 +02:00
parent e1cfb9032c
commit a418ea4145
2 changed files with 48 additions and 0 deletions

View File

@@ -23,6 +23,20 @@
"net.ipv4.tcp_congestion_control" = "bbr";
};
boot.initrd = {
compressor = "zstd";
availableKernelModules = ["virtio-pci"];
network = {
enable = true;
udhcpc.enable = true;
ssh = {
enable = true;
hostKeys = [config.sops.secrets."ssh_tmp_key".path];
authorizedKeyFiles = [../nixy/ssh_pubkey];
};
};
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
@@ -316,6 +330,10 @@
sopsFile = ./secrets/borgbase_ssh_key.yaml;
};
sops.secrets."ssh_tmp_key" = {
sopsFile = ./secrets/ssh_tmp_key.yaml;
};
networking.hostName = "magpie";
networking.firewall.enable = true;