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