2023-01-02 09:44:59 +01:00
|
|
|
{ pkgs, ... }:
|
2021-03-04 10:56:14 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
asGB = size: toString (size * 1024 * 1024);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
nix = {
|
2022-01-29 11:24:20 +01:00
|
|
|
settings.trusted-public-keys = [
|
2021-03-04 10:56:14 +01:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
|
|
|
|
2022-01-29 11:24:20 +01:00
|
|
|
settings.substituters = [
|
2021-03-04 10:56:14 +01:00
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
];
|
|
|
|
|
2022-01-29 11:24:20 +01:00
|
|
|
# Hard-link duplicated files
|
|
|
|
settings.auto-optimise-store = true;
|
2021-03-06 19:15:05 +01:00
|
|
|
|
2022-01-29 11:24:20 +01:00
|
|
|
# auto-free the /nix/store
|
|
|
|
settings.min-free = asGB 10;
|
|
|
|
settings.max-free = asGB 200;
|
2021-03-04 10:56:14 +01:00
|
|
|
|
2022-01-29 11:24:20 +01:00
|
|
|
# useful for ad-hoc nix-shell's for debugging
|
2023-07-29 17:37:07 +10:00
|
|
|
# use mkForce to avoid search path warnings with nix-darwin
|
|
|
|
nixPath = pkgs.lib.mkForce [ "nixpkgs=${pkgs.path}" ];
|
2021-03-04 10:56:14 +01:00
|
|
|
|
|
|
|
gc.automatic = true;
|
2022-07-11 09:26:03 +02:00
|
|
|
gc.options = "--delete-older-than 14d";
|
2021-03-04 10:56:14 +01:00
|
|
|
};
|
|
|
|
}
|