{ config, lib, pkgs, ... }: { # Enable flakes and other experimental features nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; trusted-users = [ "root" "@wheel" ]; substituters = [ "https://cache.nixos.org/" "https://nix-community.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; # Enable garbage collection gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; # Optimize store weekly optimise = { automatic = true; dates = [ "03:45" ]; }; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; }