make systemProfiles an attrset

This commit is contained in:
xunuwu 2025-06-06 12:01:12 +02:00
parent 8e45ad0537
commit f44f1a3a46
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
4 changed files with 77 additions and 70 deletions

View file

@ -5,7 +5,15 @@
nixpkgs,
...
} @ inputs: let
systemProfiles = ./sys/profiles;
_loadProfiles = dir:
b.readDir dir
|> b.mapAttrs (categoryName: _:
b.readDir /${dir}/${categoryName}
|> l.mapAttrs' (profileName: _: {
name = l.removeSuffix ".nix" profileName;
value = /${dir}/${categoryName}/${profileName};
}));
systemProfiles = _loadProfiles ./sys/profiles;
homeProfiles = ./home;
vars = import ./vars;
l = nixpkgs.lib;