add file prefix for nix 2.19 or newer
All checks were successful
checks-impure / test (pull_request) Successful in 1m55s
checks / test (pull_request) Successful in 2m45s

This commit is contained in:
Jörg Thalheim 2024-02-15 12:18:14 +01:00
parent 2e900d943d
commit 4943c33307

View File

@ -204,7 +204,7 @@ class Machine:
((builtins.getFlake "{url}").clanInternals.machinesFunc."{system}"."{self.name}" {{
extraConfig = builtins.fromJSON (builtins.readFile (builtins.fetchTree {{
type = "file";
url = "{config_json.name}";
url = if (builtins.compareVersions builtins.nixVersion "2.19") == -1 then "{config_json.name}" else "file:{config_json.name}";
narHash = "{nar_hash}";
}}));
}}).{attr}