Skip to content

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

Open

Description

@kirelagin

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.

Activity

  1. added
    0.kind: bug
    on Oct 19, 2020
  2. added
    6.topic: developer experience
    and removed
    6.topic: developer experience
    on Oct 20, 2020
  3. samuelgrf commented on Oct 21, 2020

    @samuelgrf
    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)

  4. doronbehar commented on Oct 23, 2020

    @doronbehar
    Contributor

    See also: #101367 .

  5. stale commented on Jun 6, 2021

    @stale

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

  6. added
    2.status: stale
    on Jun 6, 2021
  7. doronbehar commented on Jun 10, 2021

    @doronbehar
    Contributor

    Still an issue.

  8. removed
    2.status: stale
    on Jun 10, 2021
  9. mausch commented on Jun 13, 2023

    @mausch
    Member

    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

  10. iFreilicht commented on Jun 19, 2023

    @iFreilicht
    Contributor

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

    NIXPKGS_ALLOW_UNFREE=1 nix profile install --impure .#
    
  11. Lord-Valen commented on Feb 18, 2025

    @Lord-Valen
    Contributor

    It seemingly does consider the configuration file when using --impure, so any added environment variables should be unnecessary.

  12. added
    2.status: stale
    on Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug2.status: stale

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions