1
0
Fork 0
nixos-config/system/init_ssh.nix
Malte Brandy a1bb4277b1
Reformat
2019-07-31 23:56:52 +02:00

23 lines
558 B
Nix

{ config, pkgs, lib, ... }:
with lib; {
options = { m-0.server.initSSHKey = mkOption { type = types.path; }; };
config = {
boot.initrd = {
network = {
enable = true;
ssh = {
enable = true;
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
# generate file with
# nix-shell -p dropbear
# dropbearkey -t rsa -f boot_rsa
hostRSAKey = config.m-0.server.initSSHKey;
};
};
postMountCommands = "ip link set eth0 down";
};
};
}