nix-files/cfg/fs.nix
Colin 1064867194 migrate the nix install to an external USB drive.
this requires a patch to uboot:
- uboot thinks the drive has a capacity of 0 (i.e. 'unknown'). unclear precisely why. could be noncompliant drive firmware, or a timeout somewhere.

and a patch to the rpi bootloader:
- in order to trampoline into the rpi-4 uboot.

and custom kernel modules in the initrd:
- in order to detect the USB hub (rpi fw).

additionally, i'm MANUALLY placing `bcm2711-rpi-400.dtb` into `/boot/nixos/..-linux-5.10.111-dtbs/broadcom`.
i'll want to do this automatically over time.

i hope to simplify much of this over time: this is just the first thing which works after a couple days of hacking at it.
2022-05-17 01:58:12 +00:00

63 lines
1.5 KiB
Nix

{ config, pkgs, lib, ... }:
{
# fileSystems."/" = {
# device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
# fsType = "ext4";
# };
fileSystems."/" = {
device = "/dev/disk/by-uuid/2be70d38-79f4-41b6-bee2-bce5a25f8f7b";
fsType = "ext4";
};
fileSystems."/boot" = {
# this is the /dev/sda1 boot device.
# by mounting this in boot, we can then run `nixos-rebuild` and it'll only take affect when booting from sda1
# (old mmc1 boot will be preserved)
device = "/dev/disk/by-uuid/B318-A67E";
fsType = "vfat";
};
# fileSystems."/mnt/storage" = {
# device = "/dev/disk/by-uuid/2be70d38-79f4-41b6-bee2-bce5a25f8f7b";
# fsType = "ext4";
# };
# temporary; nix porting
# fileSystems."/home/colin" = {
# device = "/mnt/storage/home/colin";
# options = [ "bind" ];
# };
# fileSystems."/boot" = {
# device = "/mnt/storage/boot";
# options = [ "bind" ];
# };
# fileSystems."/var/spool" = {
# device = "/mnt/storage/var/spool";
# options = [ "bind" ];
# };
# fileSystems."/var/lib" = {
# device = "/mnt/storage/var/lib";
# options = [ "bind" ];
# };
fileSystems."/var/lib/pleroma" = {
device = "/opt/pleroma";
options = [ "bind" ];
};
fileSystems."/var/lib/transmission/Downloads" = {
device = "/opt/uninsane/media";
options = [ "bind" ];
};
fileSystems."/var/lib/transmission/.incomplete" = {
device = "/opt/uninsane/media/incomplete";
options = [ "bind" ];
};
# swapDevices = [
# { device = "/swapfile"; size = 4096; }
# ];
}