From 210d4e7c2e7102355e8ef92681800157faa57d16 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Fri, 6 Aug 2021 16:20:44 +0200 Subject: initial commit --- config/networking.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config/networking.nix (limited to 'config/networking.nix') diff --git a/config/networking.nix b/config/networking.nix new file mode 100644 index 0000000..21bcc83 --- /dev/null +++ b/config/networking.nix @@ -0,0 +1,37 @@ +{ ... }: + +{ + networking = { + hostName = "hermes.aristote.fr"; + + useDHCP = false; + interfaces.ens3.ipv4.addresses = [{ + address = "93.95.228.53"; + prefixLength = 16; + }]; + defaultGateway = "93.95.228.1"; + nameservers = [ "93.95.224.28" "93.95.224.29" ]; + + firewall = { + enable = true; + allowedTCPPorts = [ 80 443 ]; + }; + }; + + services.nginx = { + enable = true; + virtualHosts = { + "quentin.aristote.fr" = { root = "${pkgs.personal.academic-webpage}"; }; + }; + }; + + services.openssh = { + enable = true; + permitRootLogin = "no"; + passwordAuthentication = false; + extraConfig = '' + AcceptEnv PS1 + ''; + }; + services.fail2ban.enable = true; +} -- cgit v1.2.3