❯ NIXPKGS_ALLOW_UNFREE=1 sudo nixos-rebuild switch
building Nix...
building the system configuration...
error: Package ‘netease-cloud-music-1.2.1’ in /nix/store/03g9bk2dv77ds6xd7vlpacmvyaj6fvxs-source/pkgs/netease-cloud-music/default.nix:440 has an unfree license (‘unfree’), 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: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
(Flake) command, `--impure` must be passed in order to read this
environment variable.
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) [
"netease-cloud-music"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
The package I want to build is here
What something wrong I do?