diff --git a/modules/global/caches/default.nix b/modules/global/caches/default.nix deleted file mode 100644 index 7bf8f43..0000000 --- a/modules/global/caches/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: -let - folder = ./.; - toImport = name: value: folder + ("/" + name); - filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix"; - imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); -in -{ - inherit imports; - nix.settings.substituters = lib.mkBefore [ "https://cache.nixos.org/" ]; -} diff --git a/modules/global/caches/official.nix b/modules/global/caches/official.nix new file mode 100644 index 0000000..d15b0bc --- /dev/null +++ b/modules/global/caches/official.nix @@ -0,0 +1,4 @@ +{ lib, ... }: +{ + nix.settings.substituters = lib.mkBefore [ "https://cache.nixos.org/" ]; +} diff --git a/modules/global/caches/personal.nix b/modules/global/caches/personal.nix new file mode 100644 index 0000000..550ca87 --- /dev/null +++ b/modules/global/caches/personal.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +{ + nix.settings = { + substituters = lib.flatten [ + (lib.optional (config.networking.hostName != "Infini-DESKTOP" && config.info.loc.home) "ssh://infini-desktop") + "https://hydra.inx.moe" + ]; + trusted-public-keys = [ + "infinidoge-1:uw2A6JHHdGJ9GPk0NEDnrdfVkPp0CUY3zIvwVgNlrSk=" + ]; + }; +} diff --git a/modules/global/caches/ssh.nix b/modules/global/caches/ssh.nix deleted file mode 100644 index 50022d5..0000000 --- a/modules/global/caches/ssh.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, lib, ... }: -{ - nix.settings = { - substituters = lib.mkIf (config.networking.hostName != "Infini-DESKTOP" && config.info.loc.home) - ((if config.info.loc.home then (lib.mkOrder 300) else lib.mkAfter) [ - "ssh://infini-desktop" - ]); - trusted-public-keys = [ - "infinidoge-1:uw2A6JHHdGJ9GPk0NEDnrdfVkPp0CUY3zIvwVgNlrSk=" - ]; - }; -}