os/cachix.nix
Timothy DeHerrera 4456d570cc
cachix: add personal cachix information
No profile imports it by default, but if the user wishes to benefit from
having some of the packages expressed in this flake pulled down from
the cache instead of built locally, they can easily import ./cachix.nix
from any profile or host.
2020-07-10 18:28:14 -06:00

14 lines
414 B
Nix

# 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/"];
}