From 093cb612282f48d15ba295f109660e47a22f8e39 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sat, 18 Feb 2023 14:31:33 +0100 Subject: factor out common configuration options --- config/networking.nix | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'config/networking.nix') diff --git a/config/networking.nix b/config/networking.nix index decd84e..172834d 100644 --- a/config/networking.nix +++ b/config/networking.nix @@ -1,6 +1,12 @@ { pkgs, ... }: { + personal.networking = { + enable = true; + firewall.http = true; + ssh.enable = true; + }; + networking = { hostName = "hermes"; domain = "aristote.fr"; @@ -12,20 +18,5 @@ }]; defaultGateway = "93.95.228.1"; nameservers = [ "93.95.224.28" "93.95.224.29" ]; - - firewall = { - enable = true; - allowedTCPPorts = [ 80 443 ]; - }; - }; - - services.openssh = { - enable = true; - permitRootLogin = "no"; - passwordAuthentication = false; - extraConfig = '' - AcceptEnv PS1 - ''; }; - services.fail2ban.enable = true; } -- cgit v1.2.3