{ config, systemPkgs, ... }: { nix = { extraOptions = '' experimental-features = nix-command flakes ''; 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}" ]; }; }