aboutsummaryrefslogtreecommitdiff
path: root/nixos/cachix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/cachix.nix')
-rw-r--r--nixos/cachix.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/cachix.nix b/nixos/cachix.nix
new file mode 100644
index 0000000..ecd2d39
--- /dev/null
+++ b/nixos/cachix.nix
@@ -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.settings.substituters = ["https://cache.nixos.org/"];
+}