diff --git a/hosts/cachix.nix b/hosts/cachix.nix new file mode 100644 index 0000000..ecd2d39 --- /dev/null +++ b/hosts/cachix.nix @@ -0,0 +1,13 @@ + +# 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.settings.substituters = ["https://cache.nixos.org/"]; +} diff --git a/hosts/cachix/cobray.nix b/hosts/cachix/cobray.nix new file mode 100644 index 0000000..63f3074 --- /dev/null +++ b/hosts/cachix/cobray.nix @@ -0,0 +1,13 @@ + +{ + nix = { + settings = { + substituters = [ + "https://cobray.cachix.org" + ]; + trusted-public-keys = [ + "cobray.cachix.org-1:6ZmcK5aWb30lKS4VkEkPV2YkMv8yXYu5eQjY9D6r8kk=" + ]; + }; + }; +} diff --git a/hosts/configuration.nix b/hosts/configuration.nix index 12f3f6c..c05205a 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -7,6 +7,7 @@ ./hardware-configuration.nix ./system-packages.nix ../modules/default.nix + ./cachix.nix ]; nix.gc = {