refactor: move home-manager module to flake to prevent infinite recursion errors when importing modules
This commit is contained in:
parent
76027fb711
commit
f1cf2988f4
3 changed files with 23 additions and 31 deletions
25
flake.nix
25
flake.nix
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue