{ lib, ... }:
let
  user = "matt";
in
{
  nix = {
    settings = {
      substituters = [
        "https://cache.mjallen.dev/nas-cache"
      ];
      trusted-public-keys = [
        "nas-cache:5ibTWOXJYlKBaoNtdDEPmvdLPtfnbwf9jvdnfwi5dUs="
      ];
      warn-dirty = lib.mkForce false;
      experimental-features = lib.mkForce [
        "nix-command"
        "flakes"
      ];
      trusted-users = [ user ];
    };
    # settings.builders-use-substitutes = true;
    # distributedBuilds = true;
    buildMachines = [
      {
        hostName = "jallen-nas.local";
        system = "x86_64-linux";
        maxJobs = 10;
        sshUser = "admin";
        supportedFeatures = [
          "nixos-test"
          "benchmark"
          "big-parallel"
          "kvm"
        ];
      }
    ];
  };
}
