mediabox: add ssh service to initrd

This commit is contained in:
2024-04-21 13:10:33 +02:00
parent 4e83712fc0
commit 7024f0e216
2 changed files with 48 additions and 1 deletions

View File

@@ -30,6 +30,10 @@
sopsFile = ../common/secrets/wg_preshared.yaml;
};
sops.secrets."ssh_dummy_ed25519_key" = {
sopsFile = ./secrets/dummy_ssh_key.yaml;
};
nix = {
optimise.automatic = true;
gc.automatic = true;
@@ -41,7 +45,20 @@
};
boot = {
initrd.compressor = "zstd";
initrd = {
compressor = "zstd";
availableKernelModules = ["e1000e"];
network = {
enable = true;
udhcpc.enable = true;
ssh = {
enable = true;
hostKeys = [config.sops.secrets."ssh_dummy_ed25519_key".path];
authorizedKeys = [(builtins.readFile ../nixy/ssh_pubkey)];
};
};
};
kernelModules = ["acpi_call"];
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["msr.allow_writes=on"];