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 = {