refactor(common): modularize common host module
check / lint (push) Successful in 14s

This commit is contained in:
2026-10-11 17:34:29 +02:00
parent deeffb8b8b
commit 7f5d7914c4
13 changed files with 124 additions and 81 deletions
+37
View File
@@ -0,0 +1,37 @@
{
inputs,
outputs,
dotsPath,
myUtils,
config,
lib,
...
}:
let
homeDir = ../../home/hosts + "/${config.host.name}";
in
{
imports = [ inputs.home-manager.nixosModules.default ];
config.home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit
inputs
outputs
dotsPath
myUtils
;
};
sharedModules = [
{
host.username = lib.mkDefault config.host.username;
}
];
users = lib.optionalAttrs (builtins.pathExists homeDir) {
${config.host.username} = import homeDir;
};
};
}