mirror of
https://github.com/Unkn0wnCat/dotfiles.git
synced 2025-06-05 09:41:36 +02:00
Add ssh configuration
This commit is contained in:
parent
a46d297fc7
commit
2e48cc8833
5 changed files with 49 additions and 6 deletions
|
@ -6,6 +6,7 @@ in {
|
|||
options.kevin.networking = {
|
||||
enable = mkEnableOption "kevins networking";
|
||||
avahi.enable = mkEnableOption "avahi";
|
||||
ssh.enable = mkEnableOption "ssh";
|
||||
firewall.wireguard = mkEnableOption "wireguard exceptions";
|
||||
firewall.syncthing = mkEnableOption "syncthing exceptions";
|
||||
};
|
||||
|
@ -24,6 +25,17 @@ in {
|
|||
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
})
|
||||
(mkIf cfg.ssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
passwordAuthentication = false;
|
||||
kbdInteractiveAuthentication = false;
|
||||
#permitRootLogin = "yes";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
})
|
||||
(mkIf cfg.firewall.wireguard {
|
||||
networking.firewall = {
|
||||
# if packets are still dropped, they will show up in dmesg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue