1
0
Fork 0
nixos-config/nixos/roles/server/init_ssh.nix
Malte Brandy 57123b08e1 Reformat
2022-03-08 02:42:46 +01:00

23 lines
464 B
Nix

{
config,
pkgs,
lib,
...
}:
with lib; {
options = {m-0.server.initSSHKey = mkOption {type = types.path;};};
config = {
boot.initrd = {
network = {
enable = true;
ssh = {
enable = pkgs.withSecrets;
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
hostKeys = [config.m-0.server.initSSHKey];
};
};
postMountCommands = "ip link set eth0 down";
};
};
}