about summary refs log tree commit diff
path: root/nixos/modules/cachix/default.nix
blob: 38ad57506a9f55f5396a6f6c84d3f049a602191a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{ config, pkgs, lib, ... }:
let
  folder = ./caches;
  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/" ];

  environment.systemPackages = [ pkgs.cachix ];
}