cachix: fix deprecation warnings in nix settings

This commit is contained in:
Jez Cope 2022-07-06 17:22:37 +01:00
parent 98c83398fe
commit d32b3857e9
2 changed files with 6 additions and 9 deletions

View File

@ -1,4 +1,3 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
@ -6,8 +5,9 @@ let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
imports = lib.mapAttrsToList toImport
(lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.binaryCaches = ["https://cache.nixos.org/"];
nix.settings.substituters = [ "https://cache.nixos.org/" ];
}

View File

@ -1,10 +1,7 @@
{
nix = {
binaryCaches = [
"https://nix-community.cachix.org"
];
binaryCachePublicKeys = [
nix.settings = {
substituters = [ "https://nix-community.cachix.org" ];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};