I have tried to allow unfree packages to install steam and discord but nothing worked here are some of the things I have tried; 1. { allowUnfree = true; allowUnfreePredicate = pkg: true; }

{ nixpkgs.config.allowUnfree = true; }

( config, pkgs, allow unfree=true)

Every time I tried to rebuild something would go wrong so I tried temporary stuff like NIXPKGS_ALLOW_UNFREE=1 nix-shell And –impure But nothing worked

What should I do???

  • @[email protected]
    link
    fedilink
    1
    edit-2
    4 months ago

    my configuration.nix has this line:

    nixpkgs.config.allowUnfree = true;

    If you’re using an additional nixpkgs, (I have both 24.11 and unstable) there’s another syntax for that, depending on whether you use flakes. Anyway the above should work, flakes or not.

    If not, post the error you’re getting.

    • TROJANHEX [he/him]OP
      link
      fedilink
      English
      14 months ago

      The error I’m getting is " syntax error, unexpected ‘=’, expecting end of file

      • @[email protected]
        link
        fedilink
        34 months ago

        Probably you’re putting the code in the wrong place.

        Maybe try searching GitHub for example code, lots of people put their configs on there. Or if you post your whole config file someone can probably help

      • dblsaiko
        link
        fedilink
        2
        edit-2
        4 months ago

        It goes in a module inside the attrset braces where other options are also set. configuration.nix already has that.

        {
          nixpkgs.config.allowUnfree = true;
        
          # more option definitions
        }
        

        Actually, post your code. That way we don’t have to guess.

  • Packet [none/use name]
    link
    fedilink
    04 months ago

    Fuck it, reinstall the whole system lmfao. But seriously, send the error code. If it goes wrong on all of them then yoybare probably messing with something else. Have you enabled flakes?