update clanlib.nix

This commit is contained in:
Ingolf Wagner 2024-06-06 12:10:59 +02:00
parent 6b4496a926
commit b8cf22c653
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 3 additions and 9 deletions

View file

@ -169,7 +169,7 @@
inherit private_assets;
assets = ./nixos/assets;
factsGenerator = clan-fact-generators.lib { inherit pkgs; };
clanLib = import ./nixos/lib/clanlib.nix { inherit (pkgs) lib; machineDir = ./machines; } ;
clanLib = import ./nixos/lib/clanlib.nix { inherit (pkgs) lib; machineDir = ./machines; };
};
};

View file

@ -1,13 +1,7 @@
{lib, machineDir, ... }:
{ lib, machineDir, ... }:
let
allMachineNames =
let
#machineDir = "${config.clanCore.clanDir}/machines/";
#machineDir = ../../machines;
machines = lib.mapAttrsToList (name: _: name) (builtins.readDir machineDir);
in
machines;
allMachineNames = lib.mapAttrsToList (name: _: name) (builtins.readDir machineDir);
getFactPath = fact: machine:
"${machineDir}/${machine}/facts/${fact}";