-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand the scope of the allowUnfree
flag to all the inputs
#1090
Comments
Yeah, I've been looking into this a few times, see #792. It's tricky to fix because we don't want to use |
Hi! I am trying to use the proposed workaround with I am on macos but use nixos-darwin for all installations if that is relevant. |
You also need to enable |
Thank you for your helpful response, that was indeed the issue. It all works now! |
I am not quite sure if that's smart, but I am doing the following: {
pkgs,
lib,
config,
inputs,
...
}:
let
pkgs-stable = import inputs.nixpkgs-stable {
system = pkgs.stdenv.system;
config = pkgs.config;
};
pkgs-unstable = import inputs.nixpkgs-unstable {
system = pkgs.stdenv.system;
config = pkgs.config;
};
in
{
# https://devenv.sh/packages/
packages =
with pkgs-stable;
[
... |
Right now, it appears that setting
allowUnfree = true
only affects thenixpkgs
input; a closer look at the generated.devenv.flake.nix
file reveals the following code:So far, it appears that the only way to install "unfree" packages from external flakes is to pass them as
overlays
to the mainnixpkgs
input, which may be affected byallowUnfree = true
. A workaround I discovered is to prefix alldevenv
commands withNIXPKGS_ALLOW_UNFREE=1
or to add it directly to thedirenv
configuration file.envrc
, as shown below:To avoid this workaround, I am wondering if it makes sense to pass the
NIXPKGS_ALLOW_UNFREE=1
environment variable to allnix
commands invoked bydevenv
whenallowUnfree
is set totrue
. I'd be willing to submit a PR if the suggested change sounds like a viable solution for the mentioned scenario.The text was updated successfully, but these errors were encountered: