summary refs log tree commit diff stats
path: root/cachix.nix
diff options
context:
space:
mode:
authorAlan Pearce2019-08-27 15:02:12 +0200
committerAlan Pearce2019-08-27 15:02:57 +0200
commit4551a59f04bd3dba4e2d00449389b15040fdd54d (patch)
treecfe4b6b90cfcb9abb32d4f33287d1ff84ce624bd /cachix.nix
parent3fbb8b4190e93b3ac58511df2039ee48a412697a (diff)
downloadnixos-configuration-4551a59f04bd3dba4e2d00449389b15040fdd54d.tar.lz
nixos-configuration-4551a59f04bd3dba4e2d00449389b15040fdd54d.tar.zst
nixos-configuration-4551a59f04bd3dba4e2d00449389b15040fdd54d.zip
nix: install cachix
Diffstat (limited to 'cachix.nix')
-rw-r--r--cachix.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/cachix.nix b/cachix.nix
new file mode 100644
index 0000000..cce90a3
--- /dev/null
+++ b/cachix.nix
@@ -0,0 +1,14 @@
+
+# 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/"];
+}
+    
\ No newline at end of file