diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2021-08-06 16:20:44 +0200 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2021-08-06 16:20:44 +0200 |
| commit | 210d4e7c2e7102355e8ef92681800157faa57d16 (patch) | |
| tree | c1c599a66e34cc86056c094c438fe742ae41c03e /config/networking.nix | |
initial commit
Diffstat (limited to 'config/networking.nix')
| -rw-r--r-- | config/networking.nix | 37 |
1 files changed, 37 insertions, 0 deletions
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; +} |
