1
0
Fork 0
nixos-config/nixos/roles/server/init_ssh.nix
Malte Brandy 8ba9163b39 fix build
2020-10-01 07:38:26 +02:00

19 lines
463 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";
};
};
}