I have a package-upgrades.nix that I use to upgrade packages from unstable or a fork.
{...}:
{
nixpkgs.config = {
packageOverrides = let
pkgsUnstable = import (
fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
) { };
pkgsMaster = import (
fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz
) { };
pkgsLocal = import (
fetchTarball https://github.com/moaxcp/nixpkgs/archive/local.tar.gz
) { };
in pkgs:
rec {
dropbox = pkgsUnstable.dropbox;
jbake = pkgsUnstable.jbake;
};
};
}
This works well for things like windows manager.
notion = pkgsUnstable.notion;
...
windowManager.notion.enable = true;
The problem is allowUnfree does not seem to get set on the unstable import. I wanted to try something like this.
pkgsUnstable = import (
fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
) { inherit config };
This results in an error for an undefined config.
error: undefined variable ‘config’ at /etc/nixos/package-upgrades.nix:7:10
(use ‘--show-trace’ to show detailed location information)
building Nix...
error: undefined variable ‘config’ at /etc/nixos/package-upgrades.nix:7:10
(use ‘--show-trace’ to show detailed location information)
building the system configuration...
error: undefined variable ‘config’ at /etc/nixos/package-upgrades.nix:7:10
(use ‘--show-trace’ to show detailed location information)
Is there any way to override the config in the imported nixpkgs repo?