diff --git a/outputs.nix b/outputs.nix index bb1b52c..67b0325 100644 --- a/outputs.nix +++ b/outputs.nix @@ -22,22 +22,8 @@ in config.allowUnfree = true; overlays = [ (import ./overlay) - inputs.piped-flake.overlays.default - (_prev: final: { - piped-backend-deps = - final.piped-backend-deps.overrideAttrs - { - # Won't build due to this; added a native-arm64 to all builders on arm64 - # https://github.com/NixOS/nixpkgs/issues/255780 - requiredSystemFeatures = ["native-arm64"]; - }; - piped-backend = - final.piped-backend.overrideAttrs - { - # Won't build due to this; added a native-arm64 to all builders on arm64 - # https://github.com/NixOS/nixpkgs/issues/255780 - requiredSystemFeatures = ["native-arm64"]; - }; + (import ./overlay/piped-overlay.nix { + inherit (inputs) piped-flake; }) ]; }; diff --git a/overlay/piped-overlay.nix b/overlay/piped-overlay.nix new file mode 100644 index 0000000..6c141fb --- /dev/null +++ b/overlay/piped-overlay.nix @@ -0,0 +1,21 @@ +{piped-flake}: (prev: final: let + system = final.system; +in { + # Won't build due to this; added a native-arm64 to all builders on arm64 + # https://github.com/NixOS/nixpkgs/issues/255780 + piped-backend = + (piped-flake.packages.${system}.piped-backend.override (prev: { + piped-backend-deps = prev.piped-backend-deps.overrideAttrs { + requiredSystemFeatures = + if system == "aarch64-linux" + then ["native-arm64"] + else []; + }; + })) + .overrideAttrs { + requiredSystemFeatures = + if system == "aarch64-linux" + then ["native-arm64"] + else []; + }; +}) diff --git a/profiles/base/nix.nix b/profiles/base/nix.nix index 7c9ba8c..58cd6c0 100644 --- a/profiles/base/nix.nix +++ b/profiles/base/nix.nix @@ -27,26 +27,8 @@ in { }; overlays = [ (import ../../overlay) - - #inputs.vaultui.overlays.default - #inputs.musicutil.overlays.default - inputs.piped-flake.overlays.default - - (_prev: final: { - piped-backend-deps = - final.piped-backend-deps.overrideAttrs - { - # Won't build due to this; added a native-arm64 to all builders on arm64 - # https://github.com/NixOS/nixpkgs/issues/255780 - requiredSystemFeatures = ["native-arm64"]; - }; - piped-backend = - final.piped-backend.overrideAttrs - { - # Won't build due to this; added a native-arm64 to all builders on arm64 - # https://github.com/NixOS/nixpkgs/issues/255780 - requiredSystemFeatures = ["native-arm64"]; - }; + (import ../../overlay/piped-overlay.nix { + inherit (inputs) piped-flake; }) ]; };