{ lib, pkgs, inputs, system, ... }: { nix = { daemonCPUSchedPolicy = "idle"; daemonIOSchedClass = "idle"; daemonIOSchedPriority = 7; nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; settings = { experimental-features = [ "nix-command" "flakes" ]; trusted-users = [ "@wheel" ]; auto-optimise-store = true; allowed-users = [ "@wheel" ]; log-lines = lib.mkDefault 25; # Avoid disk full issues max-free = lib.mkDefault (3000 * 1024 * 1024); min-free = lib.mkDefault (512 * 1024 * 10); download-buffer-size = lib.mkDefault (512 * 1024 * 1024); }; gc = { automatic = true; options = "--delete-older-than 30d"; randomizedDelaySec = "60 min"; }; }; systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = 250; nixpkgs.config.permittedInsecurePackages = [ "olm-3.2.16" ]; nixpkgs.overlays = [ inputs.self.overlays.default (_: prev: { master = import inputs.nixpkgsMaster { inherit system; inherit (prev) config; }; }) ]; environment.systemPackages = with pkgs; [ cached-nix-shell git ]; }