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
7
flake.lock
generated
7
flake.lock
generated
|
|
@ -7,16 +7,15 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693208669,
|
||||
"narHash": "sha256-hHFaaUsZ860wvppPeiu7nJn/nXZjJfnqAQEu9SPFE9I=",
|
||||
"lastModified": 1694643239,
|
||||
"narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5bac4a1c06cd77cf8fc35a658ccb035a6c50cd2c",
|
||||
"rev": "d9b88b43524db1591fb3d9410a21428198d75d49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
|||
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 ];
|
||||
};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ in
|
|||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
/*nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# If you want to use overlays exported from other flakes:
|
||||
|
|
@ -32,7 +32,6 @@ in
|
|||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
inputs.nur.overlay
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
|
|
@ -40,7 +39,7 @@ in
|
|||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
home = {
|
||||
username = "nils";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
overlays = [
|
||||
# If you want to use overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
inputs.nur.overlay
|
||||
# final: prev: {
|
||||
# curl = prev.curl.override {
|
||||
# # vquic is sad right now.
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue