Two-disk (system/state) btrfs-backed QEMU VM, nftables-isolated by default, adapted from a design provided as loose files. Adds a hermesHome option to the host module and migrate-docker-hermes.sh so an existing flat HERMES_HOME (e.g. from a prior Docker deployment) can be carried over intact. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib, modulesPath, ... }:
|
|
|
|
# Only used by the guest's own /etc/nixos flake. The bootstrap image gets its
|
|
# partitioning and bootloader from nixos-generators instead, which is why
|
|
# this is kept out of common.nix.
|
|
#
|
|
# VERIFY THE LABELS on first boot with `lsblk -f`. nixos-generators names the
|
|
# root partition "nixos" and the ESP "ESP", but check rather than trust, and
|
|
# fix here if they differ. Getting this wrong means the first self-rebuild
|
|
# produces a system that will not boot.
|
|
|
|
{
|
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/nixos";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/ESP";
|
|
fsType = "vfat";
|
|
options = [ "fmask=0077" "dmask=0077" ];
|
|
};
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = false;
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
"virtio_pci" "virtio_blk" "virtio_scsi" "ahci" "sd_mod" "xhci_pci"
|
|
];
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
}
|