aboutsummaryrefslogtreecommitdiff
path: root/nixos/hosts/tente
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-12-25 20:59:34 +0100
committerMartin Fischer <martin@push-f.com>2025-12-25 21:02:59 +0100
commit816563b0c8143735d100687bf40d751296cbfa73 (patch)
tree321d85e737fc96f447e23297678c888947f65b1f /nixos/hosts/tente
parent13ef8917f09b4e8e33b119d8ac8d614bdc8f2589 (diff)
refactor: define dirs in main modules
Diffstat (limited to 'nixos/hosts/tente')
-rw-r--r--nixos/hosts/tente/default.nix1
-rw-r--r--nixos/hosts/tente/web-personal.nix5
2 files changed, 5 insertions, 1 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index 19cf4cf..2106b84 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -136,6 +136,7 @@ in
web-personal = {
domain = baseDomain;
+ dir = "/srv/www/${baseDomain}"; # not managed via Nix
matrixApiDomain = config.matrix.apiDomain;
};
diff --git a/nixos/hosts/tente/web-personal.nix b/nixos/hosts/tente/web-personal.nix
index d706b9d..093525f 100644
--- a/nixos/hosts/tente/web-personal.nix
+++ b/nixos/hosts/tente/web-personal.nix
@@ -9,6 +9,9 @@ in
domain = lib.mkOption {
type = lib.types.str;
};
+ dir = lib.mkOption {
+ type = lib.types.str;
+ };
matrixApiDomain = lib.mkOption {
type = lib.types.str;
};
@@ -27,7 +30,7 @@ in
{
enableACME = true;
forceSSL = true;
- root = "/srv/www/${cfg.domain}";
+ root = cfg.dir;
extraConfig = helpers.mkNginxConfig cfg.domain;
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown {