2021-05-30 11:19:34 +02:00
|
|
|
hostname:
|
2021-05-30 12:51:12 +02:00
|
|
|
{ config, pkgs, lib, modulesPath, ... }@all:
|
2021-05-30 11:19:34 +02:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.magic_rb.hardware."${hostname}";
|
2021-05-30 12:51:12 +02:00
|
|
|
qemu-guest = import (modulesPath + "/profiles/qemu-guest.nix") all;
|
2021-05-30 11:19:34 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.magic_rb.hardware."${hostname}" = mkEnableOption "";
|
|
|
|
|
2021-05-30 12:51:12 +02:00
|
|
|
config = mkIf cfg ({
|
2021-05-30 11:19:34 +02:00
|
|
|
boot = {
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
loader.grub.extraConfig = ''
|
|
|
|
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
|
|
|
|
terminal_input --append serial
|
|
|
|
terminal_output --append serial
|
|
|
|
'';
|
2021-05-30 12:51:12 +02:00
|
|
|
|
|
|
|
initrd.kernelModules = [
|
|
|
|
"nvme"
|
|
|
|
];
|
2021-05-30 11:19:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/d50e7ebf-8c62-4d2d-b19d-347378f7e5fe";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/79ba4403-7532-4e2c-ac5d-2910dce62009";
|
|
|
|
fsType = "xfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot/efi" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/4478-6009";
|
2021-05-30 12:51:12 +02:00
|
|
|
fsType = "vfat";
|
2021-05-30 11:19:34 +02:00
|
|
|
};
|
|
|
|
};
|
2021-05-30 12:51:12 +02:00
|
|
|
} // qemu-guest);
|
2021-05-30 11:19:34 +02:00
|
|
|
}
|