fix(nix): nixPath handle linux/darwin diff

This commit is contained in:
winston 2023-09-03 00:58:47 +02:00
parent fe438a67d7
commit e7f8ccd4ba
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -5,6 +5,7 @@
... ...
}: let }: let
inherit (lib) filterAttrs; inherit (lib) filterAttrs;
inherit (pkgs.stdenv) isDarwin isLinux;
flakes = filterAttrs (name: value: value ? outputs) inputs; flakes = filterAttrs (name: value: value ? outputs) inputs;
in { in {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -24,8 +25,15 @@ in {
builtins.mapAttrs builtins.mapAttrs
(name: v: {flake = v;}) (name: v: {flake = v;})
flakes; flakes;
nixPath = [ nixPath =
{nixpkgs = "${inputs.nixpkgs.outPath}";} if isDarwin
]; then [
{nixpkgs = "${inputs.nixpkgs.outPath}";}
]
else if isLinux
then [
"nixpkgs=${inputs.nixpkgs.outPath}"
]
else [];
}; };
} }