nixos/modules/home/default.nix

44 lines
946 B
Nix
Raw Normal View History

2024-05-26 01:10:42 +02:00
inputs@{ config, pkgs, lib, ... }:
2024-05-25 23:51:37 +02:00
2024-05-26 01:10:42 +02:00
with lib;
let
cfg = config.modules.home;
userOpts = { name, userconfig, ... }: {
options = {};
config = {
# home = {
# username = name;
# homeDirectory = "/home/${name}";
# stateVersion = "24.05";
# };
};
};
in
2024-05-25 23:51:37 +02:00
{
2024-05-26 01:10:42 +02:00
options.modules.home = {
users = mkOption {
default = {};
type = with types; attrsOf (submodule userOpts);
example = {
alice = {
shell.atuin.enable = true;
shell.direnv.enable = true;
shell.git.enable = true;
shell.zsh.enable = true;
};
};
description = ''
Additional user home configuration
'';
};
};
config = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
2024-05-27 19:45:09 +02:00
home-manager.users = mapAttrs (name: userconfig: import ./home.nix) cfg.users;
2024-05-26 01:10:42 +02:00
};
}