nixvim
nixvim copied to clipboard
allowUnfree issue with allowUnfree = true
Hello, i have trouble upgrading my flake using nix flake update, it started saying that one plugin requires "allowUnfree" (copilot-vim) and it doesnt seem to register that that one is already there. I am using nix-darwin and home-manager that loads nixvim module. And i cant get throught this error
error: Package ‘vimplugin-copilot.vim-2024-07-10’ in /nix/store/9qq0zf30wi74pz66rr05zmxq0nv17q1p-source/pkgs/applications/editors/vim/plugins/generated.nix:2687 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: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
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) [
"copilot.vim"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
Its saying really clearly what the issue is but the point is i already have nixpkgs.config.allowUnfree = true;. Also prefixing rebuild with env doesnt seem to fix it either. Can you give me some suggestion what to do? I am unable to upgrade :(
My entire config is here: https://github.com/nagy135/nix-darwin/blob/master/flake.nix