ccache: disable

This commit is contained in:
2024-11-15 05:22:54 +00:00
parent 4e008c3420
commit db2137d756
2 changed files with 14 additions and 11 deletions

View File

@@ -50,16 +50,19 @@ in
nix.settings.system-features = [ "big-parallel" ];
programs.ccache.enable = true;
nix.settings.extra-sandbox-paths = [ "/var/cache/ccache" ];
sane.persist.sys.byStore.plaintext = [
{ group = "nixbld"; mode = "0775"; path = "/var/cache/ccache"; method = "bind"; }
];
# `sloppiness = random_seed`: see <https://wiki.nixos.org/wiki/CCache#Sloppiness>
sane.fs."/var/cache/ccache/ccache.conf".file.text = ''
max_size = 50G
sloppiness = random_seed
'';
# XXX(2024-xx): ccache _works_, but the cache hit rate is so low that it's often a net negative!
# ElvishJerricco linked his ccache config in #nix-offtopic 2024-11-09, claiming he got it to
# actually speed things up with the right env vars; didn't see anything obvious there.
# programs.ccache.enable = true;
# nix.settings.extra-sandbox-paths = [ "/var/cache/ccache" ];
# sane.persist.sys.byStore.plaintext = [
# { group = "nixbld"; mode = "0775"; path = "/var/cache/ccache"; method = "bind"; }
# ];
# # `sloppiness = random_seed`: see <https://wiki.nixos.org/wiki/CCache#Sloppiness>
# sane.fs."/var/cache/ccache/ccache.conf".file.text = ''
# max_size = 50G
# sloppiness = random_seed
# '';
# corresponds to env var: NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
# nixpkgs.config.allowUnsupportedSystem = true;

View File

@@ -1,5 +1,5 @@
# `pkgsCCcache.foo`: builds `foo`, using the `ccache` compiler so that incremental builds are cheaper.
# requires `programs.ccache.enable = true`.
# requires `programs.ccache.enable = true` (see: </hosts/modules/roles/build-machine.nix>)
#
# common operations:
# - `nix-ccache --show-stats`