{systemPkgs, ...}: { nix = { settings = { auto-optimise-store = true; experimental-features = "nix-command flakes"; }; optimise = { automatic = true; dates = ["weekly"]; }; registry = { agenix = { from = { id = "agenix"; type = "indirect"; }; to = { owner = "ryantm"; repo = "agenix"; type = "github"; }; }; # Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions # https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html system.flake = systemPkgs; }; # I removed this in the past since I thought that I didn't need it, but turns out comma does :) nixPath = ["nixpkgs=${systemPkgs}"]; }; }