Files
NixOS/hosts/vps/hardware-configuration.nix
Danilo Reyes 8d62cffc8e
Some checks failed
MCP Tests / mcp-tests (push) Successful in 23s
Weekly NixOS Build & Cache / build-and-cache (push) Failing after 9m18s
linode builds both image and host
2026-02-09 00:13:59 -06:00

51 lines
1.2 KiB
Nix

{
lib,
config,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot = {
kernelModules = [ ];
extraModulePackages = [ ];
kernelParams = [ "console=ttyS0,19200n8" ];
kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv4.conf.wg0.rp_filter" = 0;
};
initrd.availableKernelModules = [
"virtio_pci"
"virtio_scsi"
"ahci"
"sd_mod"
];
loader = {
timeout = 10;
grub = {
device = "nodev";
forceInstall = true;
extraConfig = ''
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
terminal_input serial;
terminal_output serial
'';
};
};
};
fileSystems."/" = {
device = lib.mkForce (
if config.my.build.baseImage then
"/dev/sda"
else
"/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"
);
fsType = "ext4";
};
swapDevices = lib.mkMerge [
[ { device = "/dev/disk/by-uuid/f1408ea6-59a0-11ed-bc9d-525400000001"; } ]
(lib.mkIf config.my.build.baseImage [ { device = "/dev/sdb"; } ])
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}