about summary refs log tree commit diff
path: root/modules/cachix/default.nix
blob: 9dd55b5d34cc83872ed82e759fa3d4426c99ef10 (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.settings.substituters = [ "https://cache.nixos.org/" ];

  environment.systemPackages = [ pkgs.cachix ];
}