ark/lib/devos/mkHomeConfigurations.nix

16 lines
377 B
Nix
Raw Normal View History

2021-04-19 05:45:08 +03:00
{ lib }:
nixosConfigurations:
with lib;
let
mkHomes = hostName: host:
mapAttrs' (user: v: nameValuePair "${user}@${hostName}" v.home)
# So this function is useful for non-devos hosts
(host.config.system.build.homes or host.config.home-manager.users);
hmConfigs = mapAttrs mkHomes nixosConfigurations;
in
2021-04-10 04:22:08 +03:00
foldl recursiveUpdate { } (attrValues hmConfigs)