Merge pull request 'Fix: wrong path concat coercion' (#2219) from hsjobeki/clan-core:hsjobeki-main into main

This commit is contained in:
clan-bot
2024-10-07 21:14:21 +00:00
2 changed files with 7 additions and 7 deletions

View File

@@ -98,12 +98,12 @@ let
roleModules = builtins.map (
role:
let
path = "${clan-core.clanModules.${serviceName}}/roles/${role}.nix";
path = clan-core.clanModules.${serviceName} + "/roles/${role}.nix";
in
if builtins.pathExists path then
path
else
throw "Module doesn't have role: '${role}'. Path: ${path} not found."
throw "Module doesn't have role: '${role}'. Role: ${role}.nix not found."
) machineRoles;
roleServiceConfigs = builtins.filter (m: m != { }) (

View File

@@ -42,13 +42,13 @@ in
expected = {
server_imports = [
"${clan-core.clanModules.borgbackup}/roles/server.nix"
(clan-core.clanModules.borgbackup + "/roles/server.nix")
];
client_1_imports = [
"${clan-core.clanModules.borgbackup}/roles/client.nix"
(clan-core.clanModules.borgbackup + "/roles/client.nix")
];
client_2_imports = [
"${clan-core.clanModules.borgbackup}/roles/client.nix"
(clan-core.clanModules.borgbackup + "/roles/client.nix")
];
};
};
@@ -114,8 +114,8 @@ in
};
expected = {
machine_1_imports = [
"${clan-core.clanModules.borgbackup}/roles/client.nix"
"${clan-core.clanModules.borgbackup}/roles/server.nix"
(clan-core.clanModules.borgbackup + "/roles/client.nix")
(clan-core.clanModules.borgbackup + "/roles/server.nix")
];
};
};