WIP: flake: home-manager: export NixOS homes
All checks were successful
ci/woodpecker/push/check Pipeline was successful

WIP: this does not take into account the `profiles` which *also* setup
home-manager modules...

And here is what the last few commits were building up to.

This is neat, but won't be useful *very* often.
This commit is contained in:
Bruno BELANYI 2023-12-07 21:56:25 +00:00
parent f73212de38
commit f7e91dc1b9

View file

@ -40,6 +40,8 @@ let
};
mkHome = name: mkHomeCommon "${self}/hosts/homes/${name}";
mkNixosHome = name: mkHomeCommon "${self}/hosts/nixos/${name}/home.nix";
in
{
hosts.homes = {
@ -57,8 +59,17 @@ in
# Default configuration
ambroisie = system;
};
homeManagerHomes = lib.mapAttrs mkHome allHomes;
filteredNixosHosts = lib.filterAttrs (_: v: v == system) hosts.nixos;
nixosHomes' = lib.mapAttrs mkNixosHome filteredNixosHosts;
nixosHomes = lib.mapAttrs' (host: lib.nameValuePair "ambroisie@${host}") nixosHomes';
in
lib.mapAttrs mkHome allHomes;
lib.foldl' lib.mergeAttrs { }
[
homeManagerHomes
nixosHomes
];
};
};
}