From 2f819dcfba925b4e4acdb5691befdad5257b075a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 6 Oct 2019 12:17:36 +0100 Subject: [PATCH] adda cachix --- nixos/cachix.nix | 14 ++++++++++++++ nixos/cachix/cyplo.nix | 13 +++++++++++++ nixos/common.nix | 1 + 3 files changed, 28 insertions(+) create mode 100644 nixos/cachix.nix create mode 100644 nixos/cachix/cyplo.nix diff --git a/nixos/cachix.nix b/nixos/cachix.nix new file mode 100644 index 00000000..cce90a32 --- /dev/null +++ b/nixos/cachix.nix @@ -0,0 +1,14 @@ + +# WARN: this file will get overwritten by $ cachix use +{ 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 diff --git a/nixos/cachix/cyplo.nix b/nixos/cachix/cyplo.nix new file mode 100644 index 00000000..eadc33cc --- /dev/null +++ b/nixos/cachix/cyplo.nix @@ -0,0 +1,13 @@ + +{ + nix = { + binaryCaches = [ + "https://cyplo.cachix.org" + ]; + binaryCachePublicKeys = [ + "cyplo.cachix.org-1:6cmlYl6tQ1eidsjU2tw6uGN2hmzQ+P5uiQhuo6d1P5o=" + ]; + + }; +} + \ No newline at end of file diff --git a/nixos/common.nix b/nixos/common.nix index d19e07d6..8deb8ad3 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -13,6 +13,7 @@ in ./common-hardware.nix ./common-services.nix ./vim.nix + ./cachix.nix ]; nixpkgs.config = {