From 683e9a747f934cbd326e2b45ad916c3a88242fa3 Mon Sep 17 00:00:00 2001 From: chayleaf Date: Mon, 12 Jun 2023 20:12:15 +0700 Subject: [PATCH] ccache: use preprocessor mode; system76-scheduler: add osu! to games --- pkgs/default.nix | 4 ++++ system/hosts/nixmsi.nix | 3 +++ system/modules/ccache.nix | 2 ++ 3 files changed, 9 insertions(+) diff --git a/pkgs/default.nix b/pkgs/default.nix index 0246f1a..4facadd 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -337,11 +337,15 @@ rec { }; }; linuxPackages_bpiR3 = pkgs.linuxPackagesFor linux_bpiR3; + # there are few direct hits with the linux kernel, so use CCACHE_NODIRECT + # (direct hits are file-based, non-direct are preprocessed file-based) ccacheWrapper = pkgs.ccacheWrapper.override { extraConfig = '' export CCACHE_COMPRESS=1 export CCACHE_DIR="/var/cache/ccache" export CCACHE_UMASK=007 + export CCACHE_SLOPPINESS=include_file_mtime,time_macros + export CCACHE_NODIRECT=1 if [ ! -d "$CCACHE_DIR" ]; then echo "=====" echo "Directory '$CCACHE_DIR' does not exist" diff --git a/system/hosts/nixmsi.nix b/system/hosts/nixmsi.nix index e149bc5..3611d22 100644 --- a/system/hosts/nixmsi.nix +++ b/system/hosts/nixmsi.nix @@ -213,6 +213,9 @@ in { environment.etc."system76-scheduler/exceptions.ron".source = "${pkgs.system76-scheduler}/etc/system76-scheduler/exceptions.ron";*/ services.system76-scheduler.enable = true; + services.system76-scheduler.assignments = { + games.matchers = [ "osu!" ]; + }; common.workstation = true; common.gettyAutologin = true; diff --git a/system/modules/ccache.nix b/system/modules/ccache.nix index 01b4033..735b5b5 100644 --- a/system/modules/ccache.nix +++ b/system/modules/ccache.nix @@ -15,6 +15,8 @@ export CCACHE_COMPRESS=1 export CCACHE_DIR="${config.programs.ccache.cacheDir}" export CCACHE_UMASK=007 + export CCACHE_SLOPPINESS=include_file_mtime,time_macros + export CCACHE_NODIRECT=1 if [ ! -d "$CCACHE_DIR" ]; then echo "=====" echo "Directory '$CCACHE_DIR' does not exist"