From dce2e160da8da3e74c83565d6826188f002f8d4e Mon Sep 17 00:00:00 2001 From: servius Date: Sun, 1 Mar 2026 21:33:48 +0530 Subject: [PATCH] feat: Enable all substituters in all machines --- modules/nixos/substituters.nix | 53 +++++++++------------------------- nixos/ryu/configuration.nix | 5 ---- nixos/tako/configuration.nix | 3 -- 3 files changed, 13 insertions(+), 48 deletions(-) diff --git a/modules/nixos/substituters.nix b/modules/nixos/substituters.nix index 54d3e939..6e4ecfb0 100644 --- a/modules/nixos/substituters.nix +++ b/modules/nixos/substituters.nix @@ -2,49 +2,22 @@ config, lib, ... -}: -with lib; let - cfg = config.nix.substituters; -in { - options.nix.substituters = { - enableCuda = mkOption { - type = types.bool; - default = false; - description = "Enable NixOS CUDA cache"; - }; - - enableLlamaCpp = mkOption { - type = types.bool; - default = false; - description = "Enable llama-cpp cache"; - }; - }; - +}: { config = { nix.settings = { - trusted-substituters = - [ - "https://nix-community.cachix.org" - "https://nixos-raspberrypi.cachix.org" - ] - ++ optionals cfg.enableLlamaCpp [ - "https://llama-cpp.cachix.org" - ] - ++ optionals cfg.enableCuda [ - "https://cache.nixos-cuda.org" - ]; + trusted-substituters = [ + "https://nix-community.cachix.org" + "https://nixos-raspberrypi.cachix.org" + "https://llama-cpp.cachix.org" + "https://cache.nixos-cuda.org" + ]; - trusted-public-keys = - [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI=" - ] - ++ optionals cfg.enableLlamaCpp [ - "llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc=" - ] - ++ optionals cfg.enableCuda [ - "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" - ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI=" + "llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc=" + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; }; }; } diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index ca32080f..b51e8da3 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -68,11 +68,6 @@ # ../../builders/tsuba.nix ]; distributedBuilds = true; - # Enable CUDA and llama-cpp caches - substituters = { - enableCuda = true; - enableLlamaCpp = true; - }; }; users.users.${device.user} = { diff --git a/nixos/tako/configuration.nix b/nixos/tako/configuration.nix index 38db7f2d..55d748b3 100644 --- a/nixos/tako/configuration.nix +++ b/nixos/tako/configuration.nix @@ -57,9 +57,6 @@ }; package = pkgs.nixVersions.nix_2_32; # deploy-rs doesn't work with nix >= 2.32 distributedBuilds = true; - substituters = { - enableCuda = true; - }; }; users.users.${device.user} = {