diff --git a/profiles/nix/default.nix b/profiles/nix/default.nix index cd9a17b..fa9ca88 100644 --- a/profiles/nix/default.nix +++ b/profiles/nix/default.nix @@ -1,7 +1,15 @@ { config, lib, pkgs, inputs, ... }: { nix = rec { nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ]; - binaryCaches = [ "https://cache.nixos.org" ]; + binaryCaches = [ + "https://cache.nixos.org" + "https://nixos-rocm.cachix.org" + "https://nix-community.cachix.org" + ]; + binaryCachePublicKeys = [ + "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; registry.self.flake = inputs.self; registry.nixpkgs.flake = inputs.nixpkgs; @@ -13,7 +21,7 @@ autoOptimiseStore = false; package = inputs.nix.packages.x86_64-linux.nix.overrideAttrs (oa: { - patches = [./nix.patch] ++ oa.patches or []; + patches = [ ./nix.patch ./flakes.patch ] ++ oa.patches or []; }); extraOptions = '' diff --git a/profiles/nix/flakes.patch b/profiles/nix/flakes.patch new file mode 100644 index 0000000..2060841 --- /dev/null +++ b/profiles/nix/flakes.patch @@ -0,0 +1,13 @@ +diff --git a/src/nix/get-env.sh b/src/nix/get-env.sh +index 42c806450..a8563c772 100644 +--- a/src/nix/get-env.sh ++++ b/src/nix/get-env.sh +@@ -8,6 +8,8 @@ if [[ -n $stdenv ]]; then + source $stdenv/setup + fi + ++unset -f isMachO ++ + # Better to use compgen, but stdenv bash doesn't have it. + __vars="$(declare -p)" + __functions="$(declare -F)"