# The disk layout `router-install` creates, as a NixOS module: an ESP labelled # `boot` and an ext4 root labelled `nixos`. Target configurations import this so # the installed system finds its disks on any hardware. { lib, ... }: { fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-label/boot"; fsType = "vfat"; options = [ "umask=0077" ]; }; boot.loader.systemd-boot.enable = true; # The installer may run anywhere (even a BIOS-booted stick) and the firmware # may be reset: boot through the removable fallback path, not NVRAM entries. boot.loader.efi.canTouchEfiVariables = lib.mkDefault false; # Storage and USB controllers of common hardware, so the root is found on # an arbitrary box (and in VMs). boot.initrd.availableKernelModules = [ "ahci" "nvme" "sd_mod" "sdhci_pci" "usb_storage" "xhci_pci" "virtio_blk" "virtio_pci" ]; hardware.enableRedistributableFirmware = lib.mkDefault true; }