Refactored machines

This commit is contained in:
Julien Malka 2021-12-20 19:04:15 +01:00
parent 1c6b3c4a33
commit f7b980f413
6 changed files with 15 additions and 38 deletions

View file

@ -1,8 +1,7 @@
{ nixpkgs, home-manager, nixpkgs-unstable, inputs }:
with builtins;
let mapAttrNames = f: set:
listToAttrs (map (attr: { name = f attr; value = set.${attr}; }) (attrNames set));
let
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
@ -48,8 +47,6 @@ in
];
};
importConfig = path: (mapAttrNames (name: nixpkgs.lib.removeSuffix ".nix" name)) ((builtins.mapAttrs (name: value: import (path + "/${name}")) (builtins.readDir path)));
importConfig = with builtins; path: (mapAttrs (name: value: import (path + "/${name}/default.nix")) (readDir path));
}