-
Notifications
You must be signed in to change notification settings - Fork 426
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
devenv ignores allowUnfree in devenv.yaml or in system config. When trying to configure the MongoDB service, it fails to build due to allowUnfree not being set. However, both are set in the system and in devenv.yaml.
To reproduce
https://github.com/teamniteo/devenv-broken-alllow-unfree/actions/runs/14904061804
error: Package ‘mongodb-ce-8.0.4’ in «github:cachix/devenv-nixpkgs/fbc071e5c11e23fba50037de37268e3d8a1858eb»/pkgs/by-name/mo/mongodb-ce/package.nix:121 has an unfree license (‘SSPL’), refusing to evaluate.
a) To temporarily allow unfree packages, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNFREE=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.
Alternatively you can configure a predicate to allow specific packages:
{ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"mongodb-ce"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
Version
devenv version
devenv 1.6.0 (aarch64-darwin)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working