reciproka-ops/hardware/binaryLane_vm.nix

52 lines
1,003 B
Nix
Raw Normal View History

2024-03-05 13:05:20 +00:00
# Configuration common to all Reciproka Kolektivo Binary Lane VMs
{
config,
pkgs,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix") # Import the NixOS Qemu guest settings
../profiles/host_common.nix
../profiles/server_common.nix
];
boot = {
initrd = {
availableKernelModules = ["ata_piix" "sr_mod" "uhci_hcd" "virtio_blk" "virtio_pci"];
};
loader = {
grub = {
enable = true;
device = "/dev/vda";
};
};
};
# File systems configuration for the Linode VMs
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
swapDevices = [
{
device = "/dev/disk/by-label/swap";
}
];
nix.settings.max-jobs = lib.mkDefault 4;
networking = {
domain = "reciproka.co";
useDHCP = lib.mkDefault true;
firewall = {
enable = true;
trustedInterfaces = ["lo"];
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}