From 2409dfcf1cf47a7cf5aaf35581a3ffa8878c54ec Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 4 Dec 2024 02:56:20 +0200 Subject: [PATCH] ghaf-webserver: Add nginx service Also add emacs for editing pages to publish Signed-off-by: Marko Lindqvist --- hosts/ghaf-webserver/configuration.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/hosts/ghaf-webserver/configuration.nix b/hosts/ghaf-webserver/configuration.nix index 113df0fe..733f3ffb 100644 --- a/hosts/ghaf-webserver/configuration.nix +++ b/hosts/ghaf-webserver/configuration.nix @@ -5,6 +5,7 @@ inputs, modulesPath, lib, + pkgs, ... }: { @@ -20,10 +21,14 @@ ++ (with self.nixosModules; [ common service-openssh + service-nginx user-cazfi user-jrautiola ]); + # List packages installed in system profile + environment.systemPackages = with pkgs; [ emacs ]; + # this server has been installed with 24.05 system.stateVersion = lib.mkForce "24.05"; @@ -43,4 +48,20 @@ efiInstallAsRemovable = true; }; }; + + services.nginx = { + virtualHosts = { + "vedenemo.dev" = { + enableACME = true; + forceSSL = true; + root = "/var/www/vedenemo.dev"; + default = true; + }; + }; + }; + + security.acme = { + acceptTerms = true; + defaults.email = "trash@unikie.com"; + }; }