diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-10-25 00:22:45 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-10-25 00:22:45 -0700 |
commit | 9d40f5bf03dc1e0fbc59156c051e398c302d685a (patch) | |
tree | 4809962458dbdf5a34eb9aa57f2cc94b9fbe9136 | |
parent | 85c1f8f3fb98bee656e29125db213e127dbdf0e0 (diff) | |
download | nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar.gz nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar.bz2 nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar.lz nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar.xz nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.tar.zst nix-9d40f5bf03dc1e0fbc59156c051e398c302d685a.zip |
Ensure build TMPDIR consistency
Diffstat (limited to '')
-rw-r--r-- | hosts/common/core/nix.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix index 99aff56..a989f03 100644 --- a/hosts/common/core/nix.nix +++ b/hosts/common/core/nix.nix @@ -1,22 +1,18 @@ -{ inputs, lib, ... }: { +{ inputs, lib, ... }: + +let + build-tmp = "/var/tmp"; +in { nix = { settings = { auto-optimise-store = lib.mkDefault true; - build-dir = "/var/tmp"; + build-dir = build-tmp; experimental-features = [ "nix-command" "flakes" ]; - #flake-registry = ""; # Disable global flake registry This is a hold-over setting from Misterio77. Not sure significance but likely to do with nix.registry entry below. trusted-users = [ "root" "@wheel" ]; warn-dirty = false; }; - # Add each flake input as a registry to make nix3 commands consistent with your flake - #registry = lib.mapAttrs (_: value: { flake = value; }) inputs; - - # Add nixpkgs input to NIX_PATH - # This lets nix2 commands still use <nixpkgs> - #nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; - # Garbage Collection gc = { automatic = true; @@ -27,4 +23,7 @@ }; }; + + systemd.services."nix-daemon".environment.TMPDIR = build-tmp; + } |