Declaratively create config.programs.ccache.cacheDir

Instead of

         echo "Directory '$CCACHE_DIR' does not exist"
         echo "Please create it with:"
         echo "  sudo mkdir -m0770 '$CCACHE_DIR'"
         echo "  sudo chown root:nixbld '$CCACHE_DIR'"

is this acceptable?

 systemd.tmpfiles.settings = {
   "ccache-dir" = {
     "${config.programs.ccache.cacheDir}" = {
       d.mode = "0700";
       d.user = "root";
       d.group = "nixbld";
     };
   };
 }; Daanturo (talk) 10:16, 31 May 2026 (UTC)Reply
Return to "CCache" page.