build: Allow unfree packages

There's currently a bug in home-manager that does not allow for use of
unfreePredicate to specify which unfree packages are allowed in the
config. Use the workaround provided at
https://github.com/nix-community/home-manager/issues/2942#issuecomment-1378627909
to blanket allow unfree packages, instead.
This commit is contained in:
Thomas A. Christensen II 2024-12-09 15:56:52 -06:00
parent 5ddc911803
commit 8cd4a1d582
Signed by: millironx
GPG key ID: B7044A3432851F64

View file

@ -18,7 +18,14 @@
outputs = { nixpkgs, nixpkgs-unstable, home-manager, agenix, ... }:
let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
in {
homeConfigurations."millironx" =
home-manager.lib.homeManagerConfiguration {
@ -30,9 +37,7 @@
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
};
extraSpecialArgs = { inherit pkgs-unstable; };
};
};
}