WIP BROKEN SYSTEM ATM

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-03-18 00:32:21 -05:00
parent 2087ee1015
commit 1d9c4beaf3
21 changed files with 767 additions and 93 deletions

View file

@ -0,0 +1,52 @@
{
config,
lib,
...
}:
let
ccfg = import ../config.nix;
cfg_path = [
ccfg.custom_config_key
"homeManager"
];
cfg = lib.attrsets.getAttrFromPath cfg_path config;
in
{
options =
{ }
// lib.attrsets.setAttrByPath cfg_path {
users = lib.mkOption {
type = lib.types.attrsOf lib.types.attrs;
default = { };
description = "Home manager users to configure. Should match nix options of home-manager.users.<name>.*";
};
stateVersion = lib.mkOption {
type = lib.types.str;
default = "23.11";
description = "Home manager state version";
};
};
config = {
# Home manager options
security.polkit.enable = true;
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "bak";
home-manager.sharedModules = [
./programs/tmux/tmux.nix
./programs/alacritty.nix
./programs/atuin.nix
];
home-manager.users = lib.mapAttrs' (name: userConfig: {
inherit name;
value = userConfig // {
home.stateVersion = cfg.stateVersion;
programs.home-manager.enable = true;
home.username = name;
home.homeDirectory = lib.mkForce "/home/${name}";
};
}) cfg.users;
};
}