{ agenix, config, pkgs, lib, user, ... }: { imports = [ agenix.darwinModules.default ]; nixpkgs = { config = { allowUnfree = true; allowBroken = true; allowInsecure = false; allowUnsupportedSystem = true; }; overlays = let path = ../../overlays; in with builtins; map (n: import (path + ("/" + n))) ( filter (n: match ".*\\.nix" n != null || pathExists (path + ("/" + n + "/default.nix"))) ( attrNames (readDir path) ) ); }; nix = { package = pkgs.nix; settings = { trusted-users = [ "@admin" "${user}" ]; substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ]; trusted-public-keys = ["cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="]; }; gc = { automatic = true; interval = { Weekday = 0; Hour = 2; Minute = 0; }; options = "--delete-older-than 30d"; }; extraOptions = '' experimental-features = nix-command flakes ''; }; environment.systemPackages = with pkgs; [ agenix.packages."${pkgs.system}".default ]; programs.fish.enable = true; system = { primaryUser = user; stateVersion = 5; }; }