Files
nixos-setup/modules/core/nix-substituters.nix
T
ari bb53a89e1c Bye bye KDE & hello offline builds
- Offline caches will no longer fail builds
- Not using KDE anymore
- Power management for COSMIC
2025-03-18 09:47:31 -04:00

47 lines
1.2 KiB
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.skyg.core.substituters;
skygUser = config.skyg.user;
in
{
options = {
skyg.core.substituters = {
urls = mkOption {
type = types.listOf types.str;
default = [ ];
};
keys = mkOption {
type = types.listOf types.str;
default = [ ];
};
};
};
config = {
nix.settings.substituters = [
"https://cache.nixos.org"
"https://cache.flox.dev"
"https://devenv.cachix.org"
"https://cuda-maintainers.cachix.org"
] ++ cfg.urls;
nix.settings.trusted-substituters = [
"https://cache.flox.dev"
"https://devenv.cachix.org"
"https://cuda-maintainers.cachix.org"
] ++ cfg.urls;
nix.settings.trusted-public-keys = [
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
] ++ cfg.keys;
nix.settings.trusted-users = [ "root" skygUser.name ];
nix.extraOptions = ''
# Ensure we can still build when missing-server is not accessible
fallback = true
'';
};
}