From ff5cb096ded35036c3f99be8b3b0d8d30c336e2a Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Fri, 13 Feb 2026 19:06:13 +0100 Subject: [PATCH] fix www --- hosts/www/nginx.nix | 8 ++++---- hosts/www/openssh.nix | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/hosts/www/nginx.nix b/hosts/www/nginx.nix index 60302cf..4aaa1e0 100644 --- a/hosts/www/nginx.nix +++ b/hosts/www/nginx.nix @@ -4,17 +4,17 @@ let # TODO: mkVHost in { - services.nginx.virtualHosts."${config.networking.fqdn}" = { + services.nginx.virtualHosts."www.${config.networking.domain}" = { default = true; serverAliases = [config.networking.domain]; quic = true; kTLS = true; forceSSL = true; enableACME = true; - root = "/srv/http/www"; - index = "index.html"; locations."/" = { - try_files = "$uri $uri/ $uri.html =404"; + root = "/srv/http/www"; + index = "index.html"; + tryFiles = "$uri $uri/ $uri.html =404"; }; }; } diff --git a/hosts/www/openssh.nix b/hosts/www/openssh.nix index 0ea5426..c79d365 100644 --- a/hosts/www/openssh.nix +++ b/hosts/www/openssh.nix @@ -1,16 +1,21 @@ { pkgs, ... }: { - users.users.deploy = { - description = "deploys static websites from forgejo"; - shell = pkgs.nologin; - packages = [ - pkgs.rsync - ]; - openssh.authorizedKeys.keys = [ - "command='rsync --server --daemon . /srv/http/www/',restrict ssh-ed25519 AAAAB3NzaC1yc2EAAAADAQABAAABAQCy... git.berlin.ccc.de/cccb/www" - ]; - #extraGroups = ["nginx"]; + users = { + users.deploy = { + description = "deploys static websites from forgejo"; + shell = "/run/current-system/sw/bin/nologin"; + isSystemUser = true; + group = "deploy"; + packages = [ + pkgs.rsync + ]; + openssh.authorizedKeys.keys = [ + "command='rsync --server --daemon . /srv/http/www/',restrict ssh-ed25519 AAAAB3NzaC1yc2EAAAADAQABAAABAQCy... git.berlin.ccc.de/cccb/www" + ]; + #extraGroups = ["nginx"]; + }; + groups.deploy = {}; }; }