From 26dd988b7d40cd61db2b3e39f0de17478945fbf0 Mon Sep 17 00:00:00 2001 From: Christian Harke Date: Wed, 30 Nov 2022 21:44:03 +0100 Subject: [PATCH] Add additional nix binary caches --- home/base/nix/default.nix | 17 +++++++++++++++++ nixos/base/nix/default.nix | 16 +++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/home/base/nix/default.nix b/home/base/nix/default.nix index c838854c..94b8299a 100644 --- a/home/base/nix/default.nix +++ b/home/base/nix/default.nix @@ -1,4 +1,21 @@ +{ pkgs, ... }: + { + nix = { + package = pkgs.nix; + settings = { + substituters = [ + "https://christianharke.cachix.org/" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; + }; nixpkgs.config = import ./nixpkgs-config.nix; xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix; } diff --git a/nixos/base/nix/default.nix b/nixos/base/nix/default.nix index 210bdff2..aa35dd66 100644 --- a/nixos/base/nix/default.nix +++ b/nixos/base/nix/default.nix @@ -6,14 +6,24 @@ ]; nix = { - extraOptions = '' - experimental-features = nix-command flakes - ''; gc = { automatic = true; dates = "04:00"; options = "--delete-older-than 7d"; }; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ + "https://christianharke.cachix.org/" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; }; nixpkgs.config.allowUnfree = true;