{ pkgs, lib, ... }: { nix = { enable = true; package = pkgs.nix; settings = { experimental-features = [ "nix-command" "flakes" ]; # substituers that will be considered before the official ones(https://cache.nixos.org) substituters = [ "https://nix-community.cachix.org" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; builders-use-substitutes = true; auto-optimise-store = false; }; # do garbage collection weekly to keep disk usage low gc = { automatic = lib.mkDefault true; options = lib.mkDefault "--delete-older-than 7d"; }; }; }