Skip to content
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

Nixpkgs config (e.g. allowUnfree) when using nix profile #101101

Open
kirelagin opened this issue Oct 19, 2020 · 6 comments
Open

Nixpkgs config (e.g. allowUnfree) when using nix profile #101101

kirelagin opened this issue Oct 19, 2020 · 6 comments
Labels
0.kind: bug Something is broken

Comments

@kirelagin
Copy link
Member

When using the new flakes interface, e.g. nix profile, the nixpkgs configuration in ~/.config/nixpkgs/config.nix is ignored due to hermetic evaluation, so, e.g. it is not clear to me how to install unfree packages now. When I try to install a new package, the error is not helpful as it suggests using this file.

I think, this error needs to be updated to detect (?) that the evaluation is hermetic and recommend some other solution which will work.

@samuelgrf
Copy link
Member

You can work around this by running NIXPKGS_ALLOW_UNFREE=1 nix profile --impure, but this shouldn't be a long term solution.

Nix issue about this: NixOS/nix#3949 . There are plans for fixing this mentioned here: NixOS/nix#3843 (comment)

@doronbehar
Copy link
Contributor

See also: #101367 .

@stale
Copy link

stale bot commented Jun 6, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 6, 2021
@doronbehar
Copy link
Contributor

Still an issue.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 10, 2021
@mausch
Copy link
Member

mausch commented Jun 13, 2023

You can work around this by running NIXPKGS_ALLOW_UNFREE=1 nix profile --impure

This flag doesn't seem to exist?

$ NIXPKGS_ALLOW_UNFREE=1 nix profile --impure install .#
error: unrecognised flag '--impure'

Nix 2.15.1

@iFreilicht
Copy link
Contributor

iFreilicht commented Jun 19, 2023

@mausch --impure is an argument of install, not profile. Try it like this:

NIXPKGS_ALLOW_UNFREE=1 nix profile install --impure .#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

6 participants