mirror of
https://forge.darkest.space/mara/nixos-configs.git
synced 2026-11-19 11:13:59 +01:00
add agent-lab sandbox VM on muede-pc2
This commit is contained in:
parent
bb4bef7aef
commit
873622dc8a
1 changed files with 324 additions and 0 deletions
46
nixosConfigurations/agent-lab/hardware.nix
Normal file
46
nixosConfigurations/agent-lab/hardware.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
config = {
|
||||
# Legacy BIOS boot via GRUB on the virtio disk, matching the `qemu` image
|
||||
# variant (`image.efiSupport = false`). The repo-wide systemd-boot default
|
||||
# would need an ESP plus EFI firmware and a writable varstore in the
|
||||
# runner, and a guest that reinstalls its own bootloader on every
|
||||
# `nixos-rebuild switch` is one less thing for an agent to brick. Drop that
|
||||
# module wholesale -- it also owns boot.loader.timeout and the EFI vars.
|
||||
my.systemdBoot.enable = lib.mkForce false;
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
devices = [ "/dev/vda" ];
|
||||
};
|
||||
timeout = 1;
|
||||
};
|
||||
|
||||
# The runner resizes the seeded image before first boot (the image itself
|
||||
# is sized to its closure), so / has to grow into the rest of the disk.
|
||||
growPartition = true;
|
||||
|
||||
kernelParams = [ "console=ttyS0" ];
|
||||
tmp.cleanOnBoot = true;
|
||||
};
|
||||
|
||||
# Labels, not UUIDs: every reseed makes a brand new filesystem, and the
|
||||
# point of this machine is being thrown away and remade.
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
autoResize = true;
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# qemu user-mode networking hands out a lease on the single virtio NIC.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue