From aec346de0dd92450b5fb4cdb70368b1adcb678eb Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Mon, 22 Jun 2026 22:27:05 +0200 Subject: [PATCH] Use tmpfs for /tmp + make ISO building work (?) --- ISO/iso.nix | 8 ++++++++ configuration.nix | 7 +++++-- modules/bootloader.nix | 4 ++-- modules/filesystems.nix | 4 ++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 ISO/iso.nix diff --git a/ISO/iso.nix b/ISO/iso.nix new file mode 100644 index 0000000..3f890c7 --- /dev/null +++ b/ISO/iso.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + boot.supportedFilesystems = { + f2fs = true; + zfs = lib.mkForce false; # Pulled by ISO build for some reason, and it's broken as of writing + }; +} \ No newline at end of file diff --git a/configuration.nix b/configuration.nix index d9f8e28..fd5987c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -12,8 +12,8 @@ To fix problems sometimes: sudo nixos-rebuild switch -I nixos-config=/etc/nixos/configuration.nix - To make an ISO: - sudo nixos-rebuild build-image + To make an ISO: (https://nixos.org/manual/nixos/stable/#sec-image-nixos-rebuild-build-image) + sudo nixos-rebuild build-image --image-variant iso-installer */ let nixtamal = import ./tamal { @@ -60,6 +60,9 @@ in ./modules/ccache.nix ./modules/networking.nix ./modules/mesa.nix + + # ISO installer building stuff: + ./ISO/iso.nix ]; home-manager.useUserPackages = true; # Puts user packages in /etc/profiles diff --git a/modules/bootloader.nix b/modules/bootloader.nix index a6f0d2b..f98ed43 100644 --- a/modules/bootloader.nix +++ b/modules/bootloader.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { catppuccin.plymouth.enable = false; @@ -20,7 +20,7 @@ # 0 = Hide the OS choice for bootloaders. # It would still be possible to open the bootloader list by pressing any key # It just would not appear on screen unless a key is pressed - timeout = 5; + timeout = lib.mkForce 5; # Forced, else it doesn't work when making an ISO }; plymouth = { diff --git a/modules/filesystems.nix b/modules/filesystems.nix index 273df40..cf47557 100644 --- a/modules/filesystems.nix +++ b/modules/filesystems.nix @@ -20,6 +20,10 @@ services.fstrim.enable = true; + boot.tmp = { + useTmpfs = true; # I'll need to disable this or make it bigger if nix builds fail because of it + }; + # Link to nix-hardware configs in case I get a new laptop some day: # https://github.com/NixOS/nixos-hardware } \ No newline at end of file