From 60740689e4575c353248c1aad25f7db577ce8f71 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 31 Dec 2020 22:00:06 +0100 Subject: Move common nix-darwin config to darwin.nix --- system/settings/darwin.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'system/settings/darwin.nix') diff --git a/system/settings/darwin.nix b/system/settings/darwin.nix index 6143625b..629eff16 100644 --- a/system/settings/darwin.nix +++ b/system/settings/darwin.nix @@ -1,10 +1,24 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { services.nix-daemon = { enable = true; enableSocketListener = true; }; + nix = { + buildCores = lib.mkDefault 0; + daemonIONice = true; + daemonNiceLevel = 10; + gc = { + automatic = true; + user = "alan"; + options = "--max-freed $((25 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))"; + }; + }; + + nixpkgs.config = { + allowUnfree = true; + }; programs.zsh = { enable = true; -- cgit 1.4.1