snowfield/modules/hmgr/default.nix

26 lines
597 B
Nix
Raw Normal View History

2024-03-30 20:18:12 +01:00
{ config, lib, ... }:
2021-12-14 21:40:47 +01:00
let
2021-12-16 16:48:03 +01:00
cfg = config.luj.hmgr;
in
with lib;
2021-12-14 21:40:47 +01:00
{
options.luj.hmgr = mkOption {
2021-12-16 16:48:03 +01:00
type = with types; attrsOf anything;
2021-12-14 21:40:47 +01:00
};
2021-12-16 16:48:03 +01:00
config = {
home-manager.useGlobalPkgs = true;
2021-12-16 16:48:03 +01:00
home-manager.users =
lib.mapAttrs
(name: value:
{
2024-03-30 12:57:27 +01:00
imports = with builtins; (map (x: ../../home-manager-modules + "/${x}/default.nix") (attrNames (readDir ../../home-manager-modules)));
2021-12-16 16:48:03 +01:00
home.username = "${name}";
home.homeDirectory = "/home/${name}";
home.stateVersion = "21.05";
2021-12-16 16:48:03 +01:00
} // value)
cfg;
};
}