Compare commits
4 Commits
a2a89bdf72
...
59a1e1d90e
| Author | SHA1 | Date | |
|---|---|---|---|
| 59a1e1d90e | |||
| 5397a43d05 | |||
| 92c3ee46d1 | |||
| 2616cdcd96 |
30
machines/universedesktop/ccache.nix
Normal file
30
machines/universedesktop/ccache.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
ccacheWrapper = super.ccacheWrapper.override {
|
||||
extraConfig = ''
|
||||
export CCACHE_COMPRESS=1
|
||||
export CCACHE_DIR="${config.programs.ccache.cacheDir}"
|
||||
export CCACHE_UMASK=007
|
||||
if [ ! -d "$CCACHE_DIR" ]; then
|
||||
echo "====="
|
||||
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'"
|
||||
echo "====="
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -w "$CCACHE_DIR" ]; then
|
||||
echo "====="
|
||||
echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
|
||||
echo "Please verify its access permissions"
|
||||
echo "====="
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||
}
|
||||
@@ -5,6 +5,10 @@
|
||||
{ lib, config, pkgs, nixpkgs, ... }: {
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
|
||||
# Allow user-mode qemu for running riscv64 binaries
|
||||
# boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
@@ -20,6 +24,9 @@
|
||||
./programs/video.nix
|
||||
./programs/remote.nix
|
||||
./printing.nix
|
||||
|
||||
# ccache, y'know for blenders and whatnots
|
||||
./ccache.nix
|
||||
];
|
||||
|
||||
fileSystems."/home/universe/tmp" = {
|
||||
|
||||
@@ -79,6 +79,7 @@ in {
|
||||
nixpkgs.overlays = [(self: super: rec {
|
||||
# Add CUDA Support to Blender
|
||||
blender_cuda = super.blender.override {
|
||||
stdenv = super.ccacheStdenv;
|
||||
cudaSupport = true;
|
||||
};
|
||||
# Add Opencamlib for BlenderCAM Support
|
||||
|
||||
@@ -51,6 +51,7 @@ in {
|
||||
# if you also want support for flakes
|
||||
nixpkgs.overlays = [(self: super: rec {
|
||||
freecad = super.freecad.override {
|
||||
stdenv = super.ccacheStdenv;
|
||||
python = py3Cad;
|
||||
};
|
||||
})];
|
||||
|
||||
Reference in New Issue
Block a user