From b28c4ac16e882186865edfc7c0e26b65a8b12779 Mon Sep 17 00:00:00 2001 From: winston Date: Wed, 27 Dec 2023 23:56:56 +0100 Subject: [PATCH] feat(nix): mkForce darwin pins --- machines/common/shared/nix.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/machines/common/shared/nix.nix b/machines/common/shared/nix.nix index d301716..34b464b 100644 --- a/machines/common/shared/nix.nix +++ b/machines/common/shared/nix.nix @@ -14,26 +14,19 @@ in { package = pkgs.nixVersions.nix_2_19; settings = { - auto-optimise-store = pkgs.stdenv.isLinux; + auto-optimise-store = true; experimental-features = ["auto-allocate-uids" "flakes" "nix-command" "repl-flake"]; trusted-users = ["@sudo" "@wheel" "winston"]; use-xdg-base-directories = true; warn-dirty = false; } - // ((import ../../../flake.nix).nixConfig); - registry = - builtins.mapAttrs - (name: v: {flake = v;}) - flakes; + // (import ../../../flake.nix).nixConfig; + registry = builtins.mapAttrs (name: v: {flake = v;}) flakes; nixPath = if isDarwin - then [ - {nixpkgs = "${inputs.nixpkgs.outPath}";} - ] + then lib.mkForce [{nixpkgs = "${inputs.nixpkgs.outPath}";}] else if isLinux - then [ - "nixpkgs=${inputs.nixpkgs.outPath}" - ] - else []; + then ["nixpkgs=${inputs.nixpkgs.outPath}"] + else throw "Unsupported platform"; }; }