fix: refactor flake.nix, home-manager/home.nix, nixos/configuration.nix to avoid home-manager.useGlobalPkgs conflict error
This commit is contained in:
@@ -31,40 +31,16 @@
|
||||
{ ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
#pkgs = import inputs.nixpkgs {
|
||||
# inherit system;
|
||||
#};
|
||||
hostName = "january";
|
||||
userName = "autumn";
|
||||
in
|
||||
{
|
||||
nixosConfigurations.${hostName} = inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = {
|
||||
inherit hostName;
|
||||
};
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.backupFileExtension = "hm-bak";
|
||||
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.stylix.homeModules.stylix
|
||||
inputs.zen-browser.homeModules.default
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.users."autumn" = ./home-manager/home.nix;
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit inputs; inherit hostName; };
|
||||
modules = [ ./nixos/configuration.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user