47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib, config, pkgs, inputs, ... }:
|
|
|
|
let
|
|
hostname = "traveldroid";
|
|
modulesPath = ./generated/modules/${hostname};
|
|
usersPath = ./generated/users;
|
|
|
|
# Import all host-specific modules recursively (not evaluated yet)
|
|
hostModules = inputs.import-tree modulesPath;
|
|
|
|
# Import all global users
|
|
globalUsers = inputs.import-tree usersPath;
|
|
|
|
# Collect all Home Manager user attrsets from host modules + global users
|
|
hmUsersList =
|
|
map (m: m._module.args.hmUsers or {}) (hostModules.imports ++ globalUsers.imports);
|
|
|
|
in
|
|
{
|
|
#################################
|
|
# Core system config
|
|
#################################
|
|
networking.hostName = traveldroid;
|
|
system.stateVersion = "26.05";
|
|
|
|
#################################
|
|
# Enable Home Manager
|
|
#################################
|
|
programs.home-manager.enable = true;
|
|
|
|
#################################
|
|
# Module imports
|
|
#################################
|
|
imports =
|
|
[
|
|
./boot.nix
|
|
./hardware-configuration.nix
|
|
]
|
|
++ hostModules.imports
|
|
++ globalUsers.imports;
|
|
|
|
#################################
|
|
# Home Manager aggregation
|
|
#################################
|
|
home-manager.users = lib.mkMerge hmUsersList;
|
|
}
|