{ config , pkgs , lib , ... }: { imports = [ ../../pin.nix ]; services.nix-daemon = { enable = true; enableSocketListener = true; }; nix = { settings.cores = lib.mkDefault 0; daemonIOLowPriority = true; gc = { automatic = true; user = "alan"; options = "--max-freed $((25 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))"; }; settings.extra-platforms = "aarch64-darwin x86_64-darwin"; settings.experimental-features = "nix-command flakes"; settings.warn-dirty = false; settings.keep-outputs = true; settings.keep-derivations = true; linux-builder.enable = true; settings.trusted-users = [ "@admin" ]; }; nixpkgs.config = { allowUnfree = true; }; launchd.user.agents.lorri = lib.mkIf config.services.lorri.enable { serviceConfig = { RunAtLoad = lib.mkForce false; Sockets = { daemon = { SockPathName = "${(builtins.getEnv "HOME")}/Library/Caches/com.github.target.lorri.lorri.lorri/daemon.socket"; }; }; }; }; environment.launchDaemons = { "limit.maxfiles.plist" = { text = '' Label limit.maxfiles ProgramArguments launchctl limit maxfiles 64000 524288 RunAtLoad ''; }; }; environment.systemPackages = with pkgs; [ watch coreutils-prefixed nixos-rebuild # for rebuilds of remote systems ]; }