diff --git a/devices/pc/default.nix b/devices/pc/default.nix index c1e59a83..560c23da 100644 --- a/devices/pc/default.nix +++ b/devices/pc/default.nix @@ -51,6 +51,7 @@ inputs: "alderlake" ]; keepOutputs = true; + autoOptimiseStore = false; }; nixpkgs = { march = "znver4"; cuda = { enable = true; capabilities = [ "8.9" ]; forwardCompat = false; }; }; @@ -127,7 +128,7 @@ inputs: nix-serve = { enable = true; hostname = "nix-store.chn.moe"; }; smartd.enable = true; misskey.instances.misskey.hostname = "xn--qbtm095lrg0bfka60z.chn.moe"; - beesd = { enable = true; instances.root = { device = "/"; hashTableSizeMB = 2048; }; }; + beesd = { enable = true; instances.root = { device = "/"; hashTableSizeMB = 2048; threads = 4; }; }; wireguard = { enable = true; diff --git a/modules/services/beesd.nix b/modules/services/beesd.nix index b9235589..7a364fdb 100644 --- a/modules/services/beesd.nix +++ b/modules/services/beesd.nix @@ -8,8 +8,14 @@ inputs: type = types.attrsOf (types.oneOf [ types.nonEmptyStr - (types.submodule { options = - { device = mkOption { type = types.nonEmptyStr; }; hashTableSizeMB = mkOption { type = types.int; }; };}) + (types.submodule + { + options = + { + device = mkOption { type = types.nonEmptyStr; }; + hashTableSizeMB = mkOption { type = types.ints.unsigned; default = 1024; }; + threads = mkOption { type = types.ints.unsigned; default = 1; }; + };}) ]); default = {}; }; @@ -30,7 +36,7 @@ inputs: { spec = instance.value.device or instance.value; hashTableSizeMB = instance.value.hashTableSizeMB or 1024; - extraOptions = [ "--thread-count" "1" "--scan-mode" "3" ]; + extraOptions = [ "--thread-count" "${toString instance.value.threads or 1}" "--scan-mode" "3" ]; }; }) (attrsToList beesd.instances)); diff --git a/modules/services/xray.nix b/modules/services/xray.nix index f91d4b14..e23b5df5 100644 --- a/modules/services/xray.nix +++ b/modules/services/xray.nix @@ -49,11 +49,7 @@ inputs: server = [ "127.0.0.1#10853" ]; interface = xray.client.dns.extraInterfaces ++ [ "lo" ]; bind-dynamic = true; - ipset = - [ - "/developer.download.nvidia.com/noproxy_net" - "/yuanshen.com/noproxy_net" - ]; + ipset = [ "/yuanshen.com/noproxy_net" ]; address = map (host: "/${host.name}/${host.value}") (attrsToList xray.client.dns.hosts); }; }; diff --git a/modules/system/nix.nix b/modules/system/nix.nix index 7d9c2dc2..acb93a00 100644 --- a/modules/system/nix.nix +++ b/modules/system/nix.nix @@ -29,9 +29,10 @@ inputs: keep-failed = true; auto-optimise-store = nix.autoOptimiseStore; substituters = if nix.substituters == null then [ "https://cache.nixos.org/" ] else nix.substituters; + max-substitution-jobs = 1; trusted-public-keys = [ "chn:Cc+nowW1LIpe1kyXOZmNaznFDiH1glXmpb4A+WD/DTE=" ]; show-trace = true; - max-jobs = 2; + max-jobs = 1; cores = 0; keep-going = true; };