There are a couple of points here:
-
The way
nix.nix
is written is that it’s trying to set an option called “inputs.nixpkgs.config.allowUnfree
”[*] rather than try to reference something coming in frominputs
. This option does not exist. Change it to justnixpkgs.config
, since it affects only the mainpkgs
instance that is used in the system, one that’s effectively created when you callnixpkgs.lib.nixosSystem
.inputs
is actually perfectly accessible in your code, but you are not reading from it (at least in the code snippets in the post). -
If you want to use unstable
nixpkgs
while using stablenixpkgs
for the majority of the system, you have a couple of optionsa. Use an overlay.
Or
b. Create isolated instances of
pkgs-unstable
in individual modules:```nix # somefile.nix { inputs, pkgs, ... }: let pkgs-unstable = import inputs.nixpkgs { inherit (pkgs) system; }; in { environment.systemPackages = [ pkgs-unstable.hello ]; } ```
[*] not literally that, but an option with this path.