refactor: move openssh config to a mkif
This commit is contained in:
parent
aa269aa681
commit
bfeae72f73
2 changed files with 6 additions and 6 deletions
|
@ -84,6 +84,12 @@ in
|
||||||
'';
|
'';
|
||||||
})];
|
})];
|
||||||
|
|
||||||
|
services.openssh = lib.mkIf (config.stitchyconf.form == "server"){
|
||||||
|
enable = true;
|
||||||
|
settings.PasswordAuthentication = false;
|
||||||
|
settings.KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
environment.etc.hosts.mode = "0644";
|
environment.etc.hosts.mode = "0644";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
networking.hostName = "gemini";
|
networking.hostName = "gemini";
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings.PasswordAuthentication = false;
|
|
||||||
settings.KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ 22 25565 ];
|
networking.firewall.allowedTCPPorts = [ 22 25565 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||||
|
|
Loading…
Reference in a new issue