From 7bfff9fded2f20ca1de42eb339554a50054c348f Mon Sep 17 00:00:00 2001 From: chn Date: Mon, 17 Nov 2025 11:13:53 +0800 Subject: [PATCH] modules.system.nix: hardcode substituters --- modules/system/nix.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/system/nix.nix b/modules/system/nix.nix index 88d14e2d..b4750b16 100644 --- a/modules/system/nix.nix +++ b/modules/system/nix.nix @@ -8,7 +8,6 @@ inputs: type = types.listOf types.nonEmptyStr; default = with inputs.config.nixos.system.nixpkgs; if march == null then [] else [ march ]; }; - substituters = mkOption { type = types.listOf types.nonEmptyStr; default = [ "https://nix-store.chn.moe" ]; }; remote = { slave = mkOption { type = types.nullOr (types.submodule {}); default = null; }; @@ -40,6 +39,8 @@ inputs: # do not keep unused outputs, backup it manually on nas keep-outputs = false; connect-timeout = 5; + # https://cache.nixos.org 已经自带 + substituters = [ "https://nix-store.chn.moe" "https://nix-store.nas.chn.moe" ]; }; systemd.services.nix-daemon = { serviceConfig.CacheDirectory = "nix"; environment.TMPDIR = "/var/cache/nix"; }; } @@ -70,8 +71,6 @@ inputs: { nix.settings.system-features = builtins.map (march: "gccarch-${march}") nix.marches; } # includeBuildDependencies { system.includeBuildDependencies = inputs.topInputs.self.config.branch == "archive"; } - # substituters - { nix.settings.substituters = nix.substituters ++ [ "https://cache.nixos.org" ]; } # remote.slave (inputs.lib.mkIf (nix.remote.slave != null) {