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