Enable ccache
diff --git a/flake.lock b/flake.lock
index 8c315aa..b478fa0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -143,13 +143,30 @@
"type": "github"
}
},
+ "registry": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1657791189,
+ "narHash": "sha256-Z2ckMWqybpJjIdGIPuHcYzTL7DPTbFKpBZJJgGfFUog=",
+ "owner": "nixos",
+ "repo": "flake-registry",
+ "rev": "7a481cef7e86d6ceb4aec244d9bb085619360ba1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "flake-registry",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"comma": "comma",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
- "nurpkgs": "nurpkgs"
+ "nurpkgs": "nurpkgs",
+ "registry": "registry"
}
},
"utils": {
diff --git a/flake.nix b/flake.nix
index a1a0890..1f8eee2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -25,14 +25,14 @@
pkgs = import nixpkgs {
inherit system;
- config = { allowUnfree = true; };
+ config = { allowUnfree = true; replaceStdenv = { pkgs }: pkgs.ccacheStdenv; };
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
overlays = map (f: import f) unstable-overlays;
- config = { allowUnfree = true; };
+ config = { allowUnfree = true; replaceStdenv = { pkgs }: pkgs.ccacheStdenv; };
};
variables = import ./src/common/variables.nix;
diff --git a/src/system.nix b/src/system.nix
index 0461863..aab1ade 100644
--- a/src/system.nix
+++ b/src/system.nix
@@ -16,9 +16,12 @@
auto-optimise-store = true;
keep-outputs = true;
flake-registry = "${registry}/flake-registry.json";
+ extra-sandbox-paths = [ "/var/cache/ccache" ];
};
};
+ programs.ccache.enable = true;
+
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;