From 6cf40b8a0099a883d99727bd752734de67a071b8 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 5 Aug 2024 17:14:21 -0700 Subject: initial nginx configuration for fcuny.net --- nix/hosts/wildcat/configuration.nix | 30 ++++++++++++++++++++++++++++++ nix/hosts/wildcat/default.nix | 1 + 2 files changed, 31 insertions(+) create mode 100644 nix/hosts/wildcat/configuration.nix (limited to 'nix') diff --git a/nix/hosts/wildcat/configuration.nix b/nix/hosts/wildcat/configuration.nix new file mode 100644 index 0000000..c4c50c5 --- /dev/null +++ b/nix/hosts/wildcat/configuration.nix @@ -0,0 +1,30 @@ +{ ... }: { + networking = { + firewall.allowedTCPPorts = [ + # nginx + 80 + 443 + ]; + }; + + security.acme = { + defaults.email = "acme@fcuny.net"; + acceptTerms = true; + }; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + "fcuny.net" = { + addSSL = true; + enableACME = true; + locations = { + "/" = { + root = "/srv/www/fcuny.net"; + }; + }; + }; + }; + }; +} diff --git a/nix/hosts/wildcat/default.nix b/nix/hosts/wildcat/default.nix index 8d8edaa..fcaad82 100644 --- a/nix/hosts/wildcat/default.nix +++ b/nix/hosts/wildcat/default.nix @@ -3,6 +3,7 @@ imports = [ ./hardware.nix ./networking.nix + ./configuration.nix ]; boot.tmp.cleanOnBoot = true; -- cgit 1.4.1