mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-02-24 00:44:50 +01: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.
|
||||
# If you need to pass other parameters, you must use `specialArgs` by uncomment the following line
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
system = system; # refer the `system` parameter form outer scope recursively
|
||||
# To use chrome, we need to allow the installation of non-free software
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
} // inputs;
|
||||
modules = [
|
||||
./hosts/msi-rtx4090
|
||||
|
||||
@@ -141,9 +140,14 @@
|
||||
];
|
||||
};
|
||||
|
||||
nixos-test = nixpkgs.lib.nixosSystem {
|
||||
nixos-test = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = inputs;
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
system = system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
} // inputs;
|
||||
modules = [
|
||||
./hosts/nixos-test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user