WIP: flake: home-manager: export NixOS homes
All checks were successful
ci/woodpecker/push/check Pipeline was successful
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:
parent
f73212de38
commit
f7e91dc1b9
1 changed files with 12 additions and 1 deletions
|
|
@ -40,6 +40,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
mkHome = name: mkHomeCommon "${self}/hosts/homes/${name}";
|
mkHome = name: mkHomeCommon "${self}/hosts/homes/${name}";
|
||||||
|
|
||||||
|
mkNixosHome = name: mkHomeCommon "${self}/hosts/nixos/${name}/home.nix";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
hosts.homes = {
|
hosts.homes = {
|
||||||
|
|
@ -57,8 +59,17 @@ in
|
||||||
# Default configuration
|
# Default configuration
|
||||||
ambroisie = system;
|
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
|
in
|
||||||
lib.mapAttrs mkHome allHomes;
|
lib.foldl' lib.mergeAttrs { }
|
||||||
|
[
|
||||||
|
homeManagerHomes
|
||||||
|
nixosHomes
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue