{ 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 = [ "http://minipc1.lab.internal:5000" "http://bigbox2.lab.internal:5000" "https://cache.nixos.org" "https://cache.flox.dev" "https://devenv.cachix.org" "https://cache.nixos-cuda.org" "https://cosmic.cachix.org/" "https://ai.cachix.org" "https://noctalia.cachix.org" "https://hyprland.cachix.org" "https://nixarchy.cachix.org" ] ++ cfg.urls; nix.settings.trusted-substituters = [ "https://cache.flox.dev" "https://devenv.cachix.org" "https://cache.nixos-cuda.org" "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ] ++ cfg.urls; nix.settings.trusted-public-keys = [ "minipc1.lab.internal:buUlsyg+xRqkUk0MWACmIyRUtHIOPQQzg7nc4qZCc4E=" "bigbox2.lab.internal:hQVdN2RYFVq4hUu0L9h7VVJ+tpqdqmtHKYsHO+1WATs=" "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nixarchy.cachix.org-1:05JOuIlsQOWY2/5DQMq7JEA1hwlhgvmMWowMfka8mMM=" "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ] ++ cfg.keys; nix.settings.trusted-users = [ "root" skygUser.name ]; nix.settings.http-connections = 8; nix.settings.download-attempts = 10; nix.extraOptions = '' # Ensure we can still build when missing-server is not accessible fallback = true ''; }; }