snowfield/modules/hmgr/default.nix
2024-03-30 20:18:12 +01:00

25 lines
597 B
Nix

{ config, lib, ... }:
let
cfg = config.luj.hmgr;
in
with lib;
{
options.luj.hmgr = mkOption {
type = with types; attrsOf anything;
};
config = {
home-manager.useGlobalPkgs = true;
home-manager.users =
lib.mapAttrs
(name: value:
{
imports = with builtins; (map (x: ../../home-manager-modules + "/${x}/default.nix") (attrNames (readDir ../../home-manager-modules)));
home.username = "${name}";
home.homeDirectory = "/home/${name}";
home.stateVersion = "21.05";
} // value)
cfg;
};
}