aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/ba
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-27 22:46:32 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-28 00:31:10 +0100
commita9dd00105d6fad9153251b937c18e7e90a714d66 (patch)
tree3b8006fb28cd337a51c809e8e68edb94e3149a8c /modules/by-name/ba
parentfix(back): add correct links to rss feed (diff)
downloadnixos-server-a9dd00105d6fad9153251b937c18e7e90a714d66.zip
fix(modules/back): add root_url to back config
Co-authored-by: Silas Schöffel <sils@sils.li>
Diffstat (limited to 'modules/by-name/ba')
-rw-r--r--modules/by-name/ba/back/module.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/by-name/ba/back/module.nix b/modules/by-name/ba/back/module.nix
index 2ff0768..520acdb 100644
--- a/modules/by-name/ba/back/module.nix
+++ b/modules/by-name/ba/back/module.nix
@@ -7,14 +7,15 @@
}: let
cfg = config.vhack.back;
- mkConfigFile = repoPath:
+ mkConfigFile = repoPath: domain:
(pkgs.formats.json {}).generate "config.json"
{
inherit (cfg) source_code_repository_url;
repository_path = repoPath;
+ root_url = "https://${domain}";
};
- mkUnit = repoPath: port: {
+ mkUnit = repoPath: port: domain: {
description = "Back service for ${repoPath}";
wants = ["network-online.target"];
after = ["network-online.target"];
@@ -25,7 +26,7 @@
};
serviceConfig = {
- ExecStart = "${lib.getExe vhackPackages.back} ${mkConfigFile repoPath}";
+ ExecStart = "${lib.getExe vhackPackages.back} ${mkConfigFile repoPath domain}";
# Ensure that the service can read the repository
# FIXME(@bpeetz): This has the implied assumption, that all the exposed git
@@ -71,7 +72,7 @@
services =
lib.mapAttrs' (gitPath: config: {
name = builtins.replaceStrings ["/"] ["_"] "back-${config.domain}";
- value = mkUnit gitPath config.port;
+ value = mkUnit gitPath config.port config.domain;
})
cfg.repositories;