mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-21 16:31:22 +02:00
fix: create nixpkgs instance only in flake.nix, do not create it in any sub module or overlays
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -117,13 +117,12 @@
|
|||||||
# Only these four parameters can be passed by default.
|
# Only these four parameters can be passed by default.
|
||||||
# If you need to pass other parameters, you must use `specialArgs` by uncomment the following line
|
# If you need to pass other parameters, you must use `specialArgs` by uncomment the following line
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
|
||||||
pkgs-stable = import inputs.nixpkgs-stable {
|
pkgs-stable = import inputs.nixpkgs-stable {
|
||||||
system = system; # refer the `system` parameter form outer scope recursively
|
system = system; # refer the `system` parameter form outer scope recursively
|
||||||
# To use chrome, we need to allow the installation of non-free software
|
# To use chrome, we need to allow the installation of non-free software
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
} // inputs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/msi-rtx4090
|
./hosts/msi-rtx4090
|
||||||
|
|
||||||
@@ -141,9 +140,14 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-test = nixpkgs.lib.nixosSystem {
|
nixos-test = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = inputs;
|
specialArgs = {
|
||||||
|
pkgs-stable = import inputs.nixpkgs-stable {
|
||||||
|
system = system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
} // inputs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/nixos-test
|
./hosts/nixos-test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user