Skip to content

Commit

Permalink
shared/nix-conf.nix: disable auto-optimise-store in Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Nov 28, 2023
1 parent f6c7d19 commit fcc55cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion home-manager/meta/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
nix = {
package = lib.mkDefault pkgs.nix;
settings = lib.mkMerge [
(import ../../shared/nix-conf.nix)
(import ../../shared/nix-conf.nix { inherit lib pkgs; })
(import ../../shared/substituters.nix)
];
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ in
substituters = import ../../shared/substituters.nix;
in
lib.mkMerge [
(import ../../shared/nix-conf.nix)
(import ../../shared/nix-conf.nix { inherit lib pkgs; })
{
trusted-users = [ "root" "@wheel" ];
# For some reason when nix is running as daemon,
Expand Down
5 changes: 4 additions & 1 deletion shared/nix-conf.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{ lib, pkgs, ... }:

{
auto-optimise-store = true;
# https://github.com/NixOS/nix/issues/7273
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
experimental-features = [ "nix-command" "flakes" ];
}

0 comments on commit fcc55cb

Please sign in to comment.