From 62e17a44630279d26684aba56c2ed1b2ef264a6a Mon Sep 17 00:00:00 2001 From: polsevev Date: Sat, 29 Mar 2025 20:47:10 +0100 Subject: [PATCH] Move polsevev.dev to nixos machine --- nixos/hephaestus/configuration.nix | 1 + nixos/hephaestus/nginx.nix | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/nixos/hephaestus/configuration.nix b/nixos/hephaestus/configuration.nix index 564cd38..e7b5c32 100644 --- a/nixos/hephaestus/configuration.nix +++ b/nixos/hephaestus/configuration.nix @@ -56,6 +56,7 @@ packages = with pkgs; [ ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGKOGZKJO31YZem1OTZtIg3fKaatbFmqmRNRD+K9GpX rgl002@student.uib.no" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHlpPX7ogQo0dG0Ze4VSsAAJO+Z7w/wxGFZ+vuTHwDT9 forgejo-runner" ]; }; security.sudo.wheelNeedsPassword = false; diff --git a/nixos/hephaestus/nginx.nix b/nixos/hephaestus/nginx.nix index f9c209a..f5e5076 100644 --- a/nixos/hephaestus/nginx.nix +++ b/nixos/hephaestus/nginx.nix @@ -1,21 +1,25 @@ { config, pkgs, ... }: { environment.systemPackages = with pkgs; [ nginx ]; services.nginx.enable = true; - services.nginx.virtualHosts."test.l.polsevev.dev" = { - addSSL = true; - enableACME = true; - root = "/var/www/test"; + services.nginx.virtualHosts."polsevev.dev" = { + useACMEHost = "polsevev.dev"; + forceSSL = true; + root = "/var/www/polsevev/dist"; }; security.acme = { acceptTerms = true; defaults.email = "rolf.martin@glomsrud.no"; - certs."polsevev.dev" = { - domain = "*.polsevev.dev"; - dnsProvider = "cloudflare"; - environmentFile = /cloudflare.env; - group = config.services.nginx.group; + certs = { + "polsevev.dev" = { + domain = "polsevev.dev"; + dnsProvider = "cloudflare"; + environmentFile = /cloudflare.env; + group = config.services.nginx.group; + }; }; }; + + }