treewide: initial commit

This commit is contained in:
2026-04-18 16:28:25 -04:00
commit 75532a931c
18 changed files with 1237 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
{
config,
lib,
...
}:
let
cfg = config.substituters;
inherit (lib)
mkEnableOption
mkIf
optionals
;
in
{
options.substituters = {
enable = mkEnableOption "" // {
default = true;
};
garnix = mkEnableOption "" // {
default = true;
};
nix-community = mkEnableOption "" // {
default = true;
};
};
config = mkIf cfg.enable {
nix.settings = {
substituters =
(optionals cfg.garnix [ "https://cache.garnix.io" ])
++ (optionals cfg.nix-community [ "https://nix-community.cachix.org" ]);
trusted-public-keys =
(optionals cfg.garnix [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
])
++ (optionals cfg.nix-community [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]);
};
};
}