Regenerated

This commit is contained in:
2026-03-27 14:59:11 +00:00
parent d4dbe5069a
commit 33a6f7fd72
4 changed files with 345 additions and 462 deletions
+3 -29
View File
@@ -11,38 +11,12 @@ let
allModules = hostModules.imports ++ globalUsers.imports;
#########################################################
# Merge all _module.args.hmUsers safely
#########################################################
mergedHmUsers = lib.mkMerge (
builtins.concatLists (
map (m:
if builtins.hasAttr "args" m && builtins.hasAttr "hmUsers" m.args
then [ m.args.hmUsers ] # wrap in singleton list
else []
) allModules
)
);
#########################################################
# Add activation to ensure all parent directories exist
#########################################################
mergedHmUsersWithDirs = lib.mapAttrs (_: userCfg: userCfg // {
home.activation.ensureDirs = lib.hm.dag.entryAfter ["writeBoundary"] (let
ensureDirs = files: lib.mapAttrs (_: path: ''
mkdir -p $(dirname $HOME/${path})
'') files;
in
ensureDirs (builtins.attrNames (userCfg.home.file or {}))
);
}) mergedHmUsers;
in
{
#################################
# Core system config
#################################
networking.hostName = hostname;
networking.hostName = hostname; # <-- set hostname here
system.stateVersion = "26.05";
#################################
@@ -62,8 +36,8 @@ in
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Apply merged users with automatic directory creation
home-manager.users = mergedHmUsersWithDirs;
# Each module sets its own home-manager.users; no manual merging needed
# NixOS module system will merge them automatically
#################################
# System packages & programs