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 +{ 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/nixos/cachix/traxys.nix b/nixos/cachix/traxys.nix new file mode 100644 index 0000000..18d8eb3 --- /dev/null +++ b/nixos/cachix/traxys.nix @@ -0,0 +1,13 @@ + +{ + nix = { + settings = { + substituters = [ + "https://traxys.cachix.org" + ]; + trusted-public-keys = [ + "traxys.cachix.org-1:8Qir8lQJdhzUaw5AE7ICom/IB25wgdheZFxdMln7Qgg=" + ]; + }; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9a57f1b..d835a9d 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -12,6 +12,7 @@ ./pkg.nix #./home.nix ./localcfg.nix + ./cachix.nix ]; # The global useDHCP flag is deprecated, therefore explicitly set to false here.