From 49659abaf8e4f08343835448acc4b092f2773569 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 25 May 2024 22:26:01 +0200 Subject: feat(system/services/nginx)!: Change meaning of `root` key The `root` key was rather useless (it was always just the `/etc/.../` path.). This change gives it a real meaning. See the 'BREAKING CHANGE' section for more information. BREAKING CHANGE: Previously the `root` key denoted the _absolute_ root of a repository. Now it just denotes the root relative (i.e. a path within the built repository) to the repos cloning position. You should just remove the absolute part of the path (that, which is not an output in your built repository) --- system/services/nginx/default.nix | 8 ++++---- system/services/nginx/hosts.nix | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'system') diff --git a/system/services/nginx/default.nix b/system/services/nginx/default.nix index 7c2fa55..996996e 100644 --- a/system/services/nginx/default.nix +++ b/system/services/nginx/default.nix @@ -14,7 +14,7 @@ }; mkVirtHost = { domain, - root, + root ? "", url, extraSettings ? {}, }: { @@ -23,20 +23,20 @@ lib.recursiveUpdate { forceSSL = true; enableACME = true; - root = "${root}"; + root = "/etc/nginx/websites/${domain}/${root}"; } extraSettings; }; mkNixSyncRepository = { domain, - root, + root ? "", url, extraSettings ? {}, }: { name = "${domain}"; value = { - path = "${root}"; + path = "/etc/nginx/websites/${domain}/${root}"; uri = "${url}"; inherit extraSettings; }; diff --git a/system/services/nginx/hosts.nix b/system/services/nginx/hosts.nix index 9bad97d..98dbbf1 100644 --- a/system/services/nginx/hosts.nix +++ b/system/services/nginx/hosts.nix @@ -11,45 +11,37 @@ in [ { domain = "vhack.eu"; - root = "/etc/nginx/websites/vhack.eu"; url = "https://codeberg.org/vhack.eu/website.git"; } { domain = "b-peetz.de"; - root = "/etc/nginx/websites/b-peetz.de"; url = "https://codeberg.org/bpeetz/b-peetz.de.git"; } # Trinitrix { domain = "trinitrix.vhack.eu"; - # FIXME(@bpeetz): Remove the need for this pointless path. <2024-05-25> - root = "/etc/nginix/websites/trinitrix.vhack.eu"; url = "https://codeberg.org/trinitrix/website.git"; } # WKD { domain = "openpgpkey.b-peetz.de"; - root = "/etc/nginx/websites/openpgpkey.b-peetz.de"; url = "https://codeberg.org/vhack.eu/gpg_wkd.git"; extraSettings = extraWkdSettings; } { domain = "openpgpkey.s-schoeffel.de"; - root = "/etc/nginx/websites/openpgpkey.s-schoeffel.de"; url = "https://codeberg.org/vhack.eu/gpg_wkd.git"; extraSettings = extraWkdSettings; } { domain = "openpgpkey.sils.li"; - root = "/etc/nginx/websites/openpgpkey.sils.li"; url = "https://codeberg.org/vhack.eu/gpg_wkd.git"; extraSettings = extraWkdSettings; } { domain = "openpgpkey.vhack.eu"; - root = "/etc/nginx/websites/openpgpkey.vhack.eu"; url = "https://codeberg.org/vhack.eu/gpg_wkd.git"; extraSettings = extraWkdSettings; } -- cgit 1.4.1