From 4e5a3a16e17a55244670fb6ee71d79e72f62988d Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 5 Oct 2023 22:58:56 +0100 Subject: [PATCH] flake.nix: add extra-substituters --- flake.nix | 14 ++++++++++++++ home-manager/meta/default.nix | 13 ++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 121221c3..48da7728 100644 --- a/flake.nix +++ b/flake.nix @@ -236,5 +236,19 @@ ''; }; })) + + { + # Allows the user to use our cache when using `nix run `. + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org" + "https://thiagokokada-nix-configs.cachix.org" + ]; + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "thiagokokada-nix-configs.cachix.org-1:MwFfYIvEHsVOvUPSEpvJ3mA69z/NnY6LQqIQJFvNwOc=" + ]; + }; + } ]); # END recursiveMergeAttrs } diff --git a/home-manager/meta/default.nix b/home-manager/meta/default.nix index 376a64e0..48323d8d 100644 --- a/home-manager/meta/default.nix +++ b/home-manager/meta/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, osConfig, ... }: +{ config, lib, pkgs, osConfig, flake, ... }: { imports = [ @@ -24,16 +24,7 @@ # sudo echo "trusted-users = @wheel" >> /etc/nix/nix.conf nix = { package = lib.mkDefault pkgs.nix; - settings = import ../../shared/nix-conf.nix // { - extra-substituters = [ - "https://nix-community.cachix.org" - "https://thiagokokada-nix-configs.cachix.org" - ]; - extra-trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "thiagokokada-nix-configs.cachix.org-1:MwFfYIvEHsVOvUPSEpvJ3mA69z/NnY6LQqIQJFvNwOc=" - ]; - }; + settings = import ../../shared/nix-conf.nix // flake.outputs.nixConfig; }; # Set custom nixpkgs config (e.g.: allowUnfree), both for this