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
+315 -354
View File
File diff suppressed because it is too large Load Diff
+15 -54
View File
@@ -141,38 +141,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";
#################################
@@ -192,8 +166,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
@@ -955,40 +929,27 @@ in
** =generated/modules/traveldroid/apps/wofi.nix=
This is the install for Wofi, the launcher
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/apps/wofi.nix :noweb yes :mkdirp yes :eval never
{ lib, config, pkgs, flakeRoot, home-manager, ... }:
{ lib, config, pkgs, flakeRoot, ... }:
let
programName = "wofi";
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/wofi";
in
{
# Install Wofi via system packages
environment.systemPackages = [
pkgs.wofi
];
_module.args.hmUsers = {
${username} = {
home.file = {
".config/wofi/config" = {
source = "${assetPath}/config";
force = true; # overwrite existing
};
".config/wofi/style.css" = {
source = "${assetPath}/style.css";
force = true; # overwrite existing
};
home-manager.users = {
${username} = {
home.file = {
".config/wofi/config" = {
source = "${assetPath}/config";
force = true;
};
".config/wofi/style.css" = {
source = "${assetPath}/style.css";
force = true;
};
# Ensure ~/.config/wofi exists before writing files
home.activation.fixWofiDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p $HOME/.config/wofi
chmod -R u+rwx $HOME/.config/wofi
'';
};
};
};
}
#+END_SRC
+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
@@ -1,35 +1,22 @@
{ lib, config, pkgs, flakeRoot, home-manager, ... }:
{ lib, config, pkgs, flakeRoot, ... }:
let
programName = "wofi";
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/wofi";
in
{
# Install Wofi via system packages
environment.systemPackages = [
pkgs.wofi
];
_module.args.hmUsers = {
${username} = {
home.file = {
".config/wofi/config" = {
source = "${assetPath}/config";
force = true; # overwrite existing
};
".config/wofi/style.css" = {
source = "${assetPath}/style.css";
force = true; # overwrite existing
};
home-manager.users = {
${username} = {
home.file = {
".config/wofi/config" = {
source = "${assetPath}/config";
force = true;
};
".config/wofi/style.css" = {
source = "${assetPath}/style.css";
force = true;
};
# Ensure ~/.config/wofi exists before writing files
home.activation.fixWofiDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p $HOME/.config/wofi
chmod -R u+rwx $HOME/.config/wofi
'';
};
};
};
}