mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 19:55:08 +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": {
|
"locked": {
|
||||||
"lastModified": 1693208669,
|
"lastModified": 1694643239,
|
||||||
"narHash": "sha256-hHFaaUsZ860wvppPeiu7nJn/nXZjJfnqAQEu9SPFE9I=",
|
"narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "5bac4a1c06cd77cf8fc35a658ccb035a6c50cd2c",
|
"rev": "d9b88b43524db1591fb3d9410a21428198d75d49",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-23.05",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
flake.nix
19
flake.nix
|
|
@ -9,7 +9,7 @@
|
||||||
nur.url = github:nix-community/NUR;
|
nur.url = github:nix-community/NUR;
|
||||||
|
|
||||||
# Home manager
|
# 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";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
minegrub-theme.url = "github:Lxtharia/minegrub-theme/b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45";
|
minegrub-theme.url = "github:Lxtharia/minegrub-theme/b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45";
|
||||||
|
|
@ -18,29 +18,36 @@
|
||||||
# hardware.url = "github:nixos/nixos-hardware";
|
# hardware.url = "github:nixos/nixos-hardware";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, ... }@inputs: {
|
outputs = { nixpkgs, home-manager, nur, ... }@inputs: {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#nixos'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixos = nixpkgs.lib.nixosSystem {
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
# > Our main nixos configuration file <
|
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
inputs.minegrub-theme.nixosModules.default
|
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
|
# Standalone home-manager configuration entrypoint
|
||||||
# Available through 'home-manager --flake .#nils@nixos'
|
# Available through 'home-manager --flake .#nils@nixos'
|
||||||
homeConfigurations = {
|
/*homeConfigurations = {
|
||||||
"nils@nixos" = home-manager.lib.homeManagerConfiguration {
|
"nils@nixos" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||||
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
# > Our main home-manager configuration file <
|
# > Our main home-manager configuration file <
|
||||||
modules = [ ./home-manager/home.nix ];
|
modules = [ ./home-manager/home.nix ];
|
||||||
};
|
};
|
||||||
};
|
};*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ in
|
||||||
# ./nvim.nix
|
# ./nvim.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
/*nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
# If you want to use overlays exported from other flakes:
|
# If you want to use overlays exported from other flakes:
|
||||||
|
|
@ -32,7 +32,6 @@ in
|
||||||
# patches = [ ./change-hello-to-hi.patch ];
|
# patches = [ ./change-hello-to-hi.patch ];
|
||||||
# });
|
# });
|
||||||
# })
|
# })
|
||||||
inputs.nur.overlay
|
|
||||||
];
|
];
|
||||||
# Configure your nixpkgs instance
|
# Configure your nixpkgs instance
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -40,7 +39,7 @@ in
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||||
allowUnfreePredicate = (_: true);
|
allowUnfreePredicate = (_: true);
|
||||||
};
|
};
|
||||||
};
|
};*/
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "nils";
|
username = "nils";
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
# If you want to use overlays exported from other flakes:
|
# If you want to use overlays exported from other flakes:
|
||||||
# neovim-nightly-overlay.overlays.default
|
# neovim-nightly-overlay.overlays.default
|
||||||
|
inputs.nur.overlay
|
||||||
# final: prev: {
|
# final: prev: {
|
||||||
# curl = prev.curl.override {
|
# curl = prev.curl.override {
|
||||||
# # vquic is sad right now.
|
# # vquic is sad right now.
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
config = {
|
config = {
|
||||||
# Disable if you don't want unfree packages
|
# Disable if you don't want unfree packages
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
# allowUnfreePredicate = (_: true);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue