summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-25 21:27:40 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-25 21:27:40 +0100
commit33eeb84d68503e7669f44881a03738a0a30c3c9d (patch)
treeae3940e38edd41cff42b988e82149017a6dfe268
parentfeat(modules/nginx): Modularise the redirects and migrate them to server2 (diff)
downloadnixos-server-33eeb84d68503e7669f44881a03738a0a30c3c9d.tar.gz
nixos-server-33eeb84d68503e7669f44881a03738a0a30c3c9d.zip
fix(modules/back): Remove the `gitPath` from the service name
With it, the service names become nearly illegible.
-rw-r--r--modules/by-name/ba/back/module.nix2
-rw-r--r--tests/by-name/ba/back/test.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/by-name/ba/back/module.nix b/modules/by-name/ba/back/module.nix
index f732f02..2bc5159 100644
--- a/modules/by-name/ba/back/module.nix
+++ b/modules/by-name/ba/back/module.nix
@@ -63,7 +63,7 @@
 
   services =
     lib.mapAttrs' (gitPath: config: {
-      name = builtins.replaceStrings ["/"] ["_"] "back-${gitPath}-${config.domain}";
+      name = builtins.replaceStrings ["/"] ["_"] "back-${config.domain}";
       value = mkUnit gitPath config.port;
     })
     cfg.repositories;
diff --git a/tests/by-name/ba/back/test.nix b/tests/by-name/ba/back/test.nix
index 220d100..63f2837 100644
--- a/tests/by-name/ba/back/test.nix
+++ b/tests/by-name/ba/back/test.nix
@@ -104,7 +104,7 @@ in
       ''}")
 
       with subtest("back server starts"):
-        server.wait_for_unit("${builtins.replaceStrings ["/"] ["_"] "back-${gitRepoPath}-${domain}.service"}")
+        server.wait_for_unit("${builtins.replaceStrings ["/"] ["_"] "back-${domain}.service"}")
 
       with subtest("client can access the server"):
         client.succeed("${pkgs.writeShellScript "curl-back" ''