From 9d40f5bf03dc1e0fbc59156c051e398c302d685a Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Fri, 25 Oct 2024 00:22:45 -0700 Subject: Ensure build TMPDIR consistency --- hosts/common/core/nix.nix | 19 +++++++++---------- 1 file 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 - #nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; - # Garbage Collection gc = { automatic = true; @@ -27,4 +23,7 @@ }; }; + + systemd.services."nix-daemon".environment.TMPDIR = build-tmp; + } -- cgit v1.2.3