refactor: move home-manager module to flake to prevent infinite recursion errors when importing modules

This commit is contained in:
wi11-holdsworth 2025-09-25 17:40:17 +10:00
parent 76027fb711
commit f1cf2988f4
3 changed files with 23 additions and 31 deletions

View file

@ -22,7 +22,12 @@
};
outputs =
{ nixpkgs, ... }@inputs:
{
nixpkgs,
home-manager,
agenix,
...
}@inputs:
let
commonSystem =
{
@ -31,7 +36,23 @@
system ? "x86_64-linux",
}:
nixpkgs.lib.nixosSystem {
modules = [ ./hosts/${hostName}/configuration.nix ];
modules = [
./hosts/${hostName}/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
users.${userName}.imports = [
./hosts/${hostName}/home.nix
];
backupFileExtension = "backup";
extraSpecialArgs = {
inherit userName;
};
useGlobalPkgs = true;
useUserPackages = true;
};
}
];
specialArgs = {
inherit inputs;
inherit hostName;