Set up cachix as emacs-overlay binary cache

This commit is contained in:
2020-09-10 13:13:25 +02:00
parent f0ae1f74cd
commit 1223542226
4 changed files with 24 additions and 1 deletions

13
modules/cachix.nix Normal file
View File

@@ -0,0 +1,13 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
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));
in {
inherit imports;
nix.binaryCaches = [ "https://cache.nixos.org/" ];
}