why the fuck was i zeroing the stats?

switched to socketed sccache server
wrote a systemd service to spin that socket up
This commit is contained in:
TheK0tYaRa 2026-03-09 07:44:09 +02:00
parent d6ac6c94b6
commit 374c73c925
2 changed files with 32 additions and 3 deletions

View file

@ -113,6 +113,7 @@
"thek0tyara"
];
extra-sandbox-paths = [
"/run/sccache"
"/var/cache/sccache"
];
download-buffer-size = 160000000;
@ -121,6 +122,29 @@
# setgid, чтобы файлы/папки сохраняли группу nixbld
"d /var/cache/sccache 2770 root nixbld - -"
];
systemd.services.sccache = {
description = "Shared sccache server for Nix builds";
after = [ "local-fs.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "root";
Group = "nixbld";
RuntimeDirectory = "sccache";
RuntimeDirectoryMode = "0770";
UMask = "0007";
ExecStart = "${pkgs.sccache}/bin/sccache";
Restart = "always";
RestartSec = 2;
};
environment = {
SCCACHE_DIR = "/var/cache/sccache";
SCCACHE_SERVER_UDS = "/run/sccache/server.sock";
SCCACHE_IDLE_TIMEOUT = "0";
SCCACHE_START_SERVER = "1";
SCCACHE_NO_DAEMON = "1";
};
};
boot = {
loader = {
systemd-boot.enable = true;