{ lib, inputs, config, ... }: { programs.git.enable = true; programs.nh = { enable = true; clean.enable = true; clean.extraArgs = "--keep-since 7d"; }; nix = let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; in { settings = { experimental-features = [ "nix-command" "flakes" ]; flake-registry = ""; nix-path = config.nix.nixPath; }; optimise.automatic = true; registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; system.autoUpgrade = { enable = true; flake = "git+https://git.icanttype.org/cdombroski/nix-configs.git"; allowReboot = true; rebootWindow = { lower = "02:00"; upper = "06:00"; }; }; }