summary refs log tree commit diff stats
path: root/system/settings/darwin.nix
blob: 14a2b83bb4251ffca7ed67f7dfff39fa523dc4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config
, pkgs
, lib
, ...
}: {
  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;
  };

  nixpkgs.config = {
    allowUnfree = true;
  };

  environment.systemPackages = with pkgs; [
    watch
    coreutils-prefixed
  ];
}