From 8cd4a1d58236c987476d2e4ae3a0e36470eae770 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:56:52 -0600 Subject: [PATCH] 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. --- flake.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 2579988..00351da 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }; }; }