diff options
-rw-r--r-- | nix/hosts/corrino/www/cs.emile.space.nix | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/nix/hosts/corrino/www/cs.emile.space.nix b/nix/hosts/corrino/www/cs.emile.space.nix index 7aefc64..d07d9b2 100644 --- a/nix/hosts/corrino/www/cs.emile.space.nix +++ b/nix/hosts/corrino/www/cs.emile.space.nix @@ -2,18 +2,21 @@ let + inherit (builtins) toJSON; + inherit (lib) mergeAttrsList mapAttrsToList; + # get's all repos configured in cgit and converts them into some JSON that is used by hound - repos = builtins.toJSON ( - lib.mergeAttrsList ( - map - (x: { - "${x.name}" = { - url = "file://${x.path}"; - }; - }) - (lib.mapAttrsToList (name: value: value // { name = "${name}"; }) config.services.cgit.main.repos) + repos = toJSON ( + mergeAttrsList ( + map (x: { + "${x.name}" = { + url = "file://${x.path}"; + }; + }) (mapAttrsToList (name: value: value // { name = "${name}"; }) config.services.cgit.main.repos) ) ); + + cfg = config.services.hound; in { services.nginx.virtualHosts."cs.emile.space" = { @@ -21,7 +24,7 @@ in enableACME = true; locations = { "/" = { - proxyPass = "http://${config.services.hound.listen}"; + proxyPass = "http://${cfg.listen}"; }; }; }; |