Fix stinky build.

This commit is contained in:
2025-10-27 16:17:26 +00:00
parent 762037d17f
commit 98769f59d6
3 changed files with 36 additions and 12 deletions

View File

@@ -13,25 +13,45 @@
# Raspberry Pi 4 platform
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
# Disable ZFS (not needed, and broken with latest kernel)
boot.supportedFilesystems.zfs = lib.mkForce false;
# Boot configuration - provided by sd-image-aarch64.nix
# (grub disabled, generic-extlinux-compatible enabled, U-Boot setup)
# Override root filesystem to use tmpfs (from impermanence-tmpfs.nix)
# The sd-image module sets root to /dev/disk/by-label/NIXOS_SD (ext4)
# but impermanence-tmpfs.nix overrides it to tmpfs
# /boot/firmware is automatically configured by sd-image module
# Device: /dev/disk/by-label/FIRMWARE (vfat)
# Mount /nix from the NIXOS_SD partition
# /nix/persist will be a directory on this partition (not a separate mount)
fileSystems."/nix" = {
# tmpfs root with impermanence
# Override sd-image module's ext4 root definition with mkForce
fileSystems."/" = lib.mkForce {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"size=2G"
"mode=755"
];
};
# The SD partition contains /nix/store and /nix/persist at its root
# Mount it at a hidden location, then bind mount its /nix to /nix
fileSystems."/mnt/nixos-sd" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
neededForBoot = true;
};
# Bind mount /nix from the SD partition
fileSystems."/nix" = {
device = "/mnt/nixos-sd/nix";
fsType = "none";
options = [ "bind" ];
neededForBoot = true;
depends = [ "/mnt/nixos-sd" ];
};
# No swap on SD card (wear concern)
swapDevices = [ ];