Nix 2.30.0 (2025-07-07) changed the build directory from /tmp to /nix/var/nix/builds which broke a number of builds because my ZFS datasets were utf8only. This adds a role to mount tmpfs to /nix/var/nix/builds to restore the old behavior.
63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./wrapped-disk-config.nix
|
|
./distributed_build.nix
|
|
./power_management.nix
|
|
];
|
|
|
|
config = {
|
|
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
networking.hostId = "46b62d92";
|
|
|
|
networking.hostName = "recovery"; # Define your hostname.
|
|
|
|
time.timeZone = "America/New_York";
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
me.boot.secure = true;
|
|
me.mountPersistence = true;
|
|
|
|
me.optimizations = {
|
|
enable = true;
|
|
arch = "kabylake";
|
|
# build_arch = "x86-64-v3";
|
|
system_features = [
|
|
"gccarch-kabylake"
|
|
"gccarch-x86-64-v3"
|
|
"benchmark"
|
|
"big-parallel"
|
|
"kvm"
|
|
"nixos-test"
|
|
];
|
|
};
|
|
|
|
# Early KMS
|
|
# boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
# Mount tmpfs at /tmp
|
|
boot.tmp.useTmpfs = true;
|
|
|
|
# Enable TRIM
|
|
# services.fstrim.enable = lib.mkDefault true;
|
|
|
|
me.build_in_ram.enable = true;
|
|
me.doas.enable = true;
|
|
me.network.enable = true;
|
|
me.nvme.enable = true;
|
|
me.recovery.enable = true;
|
|
me.ssh.enable = true;
|
|
me.sshd.enable = true;
|
|
me.user.enable = true;
|
|
me.zfs.enable = true;
|
|
me.zrepl.enable = true;
|
|
me.zsh.enable = true;
|
|
};
|
|
}
|