aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hosts/common/core/nix.nix17
-rwxr-xr-xscripts/pretty-rebuild4
2 files changed, 5 insertions, 16 deletions
diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix
index 94be2f6..99aff56 100644
--- a/hosts/common/core/nix.nix
+++ b/hosts/common/core/nix.nix
@@ -1,22 +1,13 @@
-{ inputs, lib, ... }:
-{
-
- # work around very annoying TMPDIR handling
- # see: https://github.com/NixOS/nix/issues/7154
- boot.tmp.useTmpfs = true;
- systemd.services."nix-daemon".environment.TMPDIR = "/nix/tmp";
- systemd.tmpfiles.rules = [
- "d /nix/tmp 770 root nixbld"
- ];
+{ inputs, lib, ... }: {
nix = {
settings = {
- trusted-users = [ "root" "@wheel" ];
-
auto-optimise-store = lib.mkDefault true;
+ build-dir = "/var/tmp";
experimental-features = [ "nix-command" "flakes" ];
- warn-dirty = false;
#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
diff --git a/scripts/pretty-rebuild b/scripts/pretty-rebuild
index 4e30f4a..0814cca 100755
--- a/scripts/pretty-rebuild
+++ b/scripts/pretty-rebuild
@@ -1,11 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -i zsh --packages nvd zsh
-# sudo is used for nixos-rebuild below due to: https://github.com/NixOS/nix/issues/7154
cd /etc/nixos && \
nix flake update && \
- cd && \
- sudo env TMPDIR=/nix/tmp nixos-rebuild switch --upgrade --show-trace && \
+ nixos-rebuild switch --upgrade --show-trace && \
echo && \
nixos-rebuild list-generations | cat && \
echo && \