fix machines folder not beeing present yet

This commit is contained in:
Jörg Thalheim
2023-09-03 13:24:36 +02:00
parent 5dd318e637
commit 0a3982d0ac
2 changed files with 8 additions and 8 deletions

View File

@@ -5,13 +5,13 @@
}:
let
machinesDirs =
if builtins.pathExists (directory + /machines)
then builtins.readDir (directory + /machines)
if builtins.pathExists "${directory}/machines"
then builtins.readDir "${directory}/machines"
else { };
machineSettings = machineName:
if builtins.pathExists (directory + /machines/${machineName}/settings.json)
then builtins.fromJSON (builtins.readFile (directory + /machines/${machineName}/settings.json))
if builtins.pathExists "${directory}/machines/${machineName}/settings.json"
then builtins.fromJSON (builtins.readFile "${directory}/machines/${machineName}/settings.json")
else { };
nixosConfigurations = lib.mapAttrs