1{
2 lib,
3 inputs,
4 ...
5}:
6{
7 nix = {
8 registry = builtins.mapAttrs (_: v: { flake = v; }) (lib.filterAttrs (_: v: v ? outputs) inputs);
9 gc.automatic = false;
10 optimise.automatic = true;
11 extraOptions = ''
12 min-free = 536870912
13 keep-outputs = true
14 keep-derivations = true
15 fallback = true
16 extra-experimental-features = nix-command flakes
17 builders-use-substitutes = true
18 '';
19 nixPath = [
20 "nixpkgs=${inputs.nixpkgs}"
21 "home-manager=${inputs.home}"
22 ];
23 };
24
25 nix.settings = {
26 sandbox = true;
27 allowed-users = [ "@wheel" ];
28 trusted-users = [
29 "root"
30 "@wheel"
31 ];
32 auto-optimise-store = true;
33 };
34}