From fb47302f3bced666b1821706320b15304b12178d Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Fri, 3 Mar 2023 09:39:42 -0500 Subject: [PATCH] add cachix community binary cache --- modules/common/default.nix | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/modules/common/default.nix b/modules/common/default.nix index ce4219a..1d04288 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -77,11 +77,28 @@ config = let stateVersion = "23.05"; in { - # Enable features in Nix commands - nix.extraOptions = '' - experimental-features = nix-command flakes - warn-dirty = false - ''; + nix = { + + # Enable features in Nix commands + extraOptions = '' + experimental-features = nix-command flakes + warn-dirty = false + ''; + + settings = { + + # Add community Cachix to binary cache + substituters = [ "https://nix-community.cachix.org" ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + + # Scans and hard links identical files in the store + auto-optimise-store = true; + + }; + + }; # Basic common system packages for all devices environment.systemPackages = with pkgs; [ git vim wget curl ];