mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 11:45:06 +01:00
Integrate home-manager with nixos config
This commit is contained in:
parent
f6a02481ce
commit
bc6f9e293f
4 changed files with 20 additions and 14 deletions
19
flake.nix
19
flake.nix
|
|
@ -9,7 +9,7 @@
|
|||
nur.url = github:nix-community/NUR;
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
minegrub-theme.url = "github:Lxtharia/minegrub-theme/b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45";
|
||||
|
|
@ -18,29 +18,36 @@
|
|||
# hardware.url = "github:nixos/nixos-hardware";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs: {
|
||||
outputs = { nixpkgs, home-manager, nur, ... }@inputs: {
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
# Available through 'nixos-rebuild --flake .#nixos'
|
||||
nixosConfigurations = {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||
# > Our main nixos configuration file <
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
inputs.minegrub-theme.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.nils = import ./home-manager/home.nix;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#nils@nixos'
|
||||
homeConfigurations = {
|
||||
/*homeConfigurations = {
|
||||
"nils@nixos" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||
# > Our main home-manager configuration file <
|
||||
modules = [ ./home-manager/home.nix ];
|
||||
};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue