global/caches: refactor and add hydra.inx.moe
This commit is contained in:
parent
6b045b1737
commit
ed90ffd072
4 changed files with 16 additions and 23 deletions
|
@ -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/" ];
|
|
||||||
}
|
|
4
modules/global/caches/official.nix
Normal file
4
modules/global/caches/official.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
nix.settings.substituters = lib.mkBefore [ "https://cache.nixos.org/" ];
|
||||||
|
}
|
12
modules/global/caches/personal.nix
Normal file
12
modules/global/caches/personal.nix
Normal file
|
@ -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="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -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="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue