feat: new host - idols-akane, hardens VFAT /boot mounts (#245)

* feat: new host - idols-akane

* fix: missing efi files

* fix: efi partition - permission issue
This commit is contained in:
Ryan Yin
2026-03-07 23:54:13 +08:00
committed by GitHub
parent f9596089b3
commit 69f77fecca
10 changed files with 276 additions and 63 deletions

View File

@@ -1,41 +1,17 @@
{
modulesPath,
lib,
...
}:
##############################################################################
#
# Template for KubeVirt's VM, mainly based on:
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/kubevirt.nix
#
# We write our hardware-configuration.nix, so that we can do some customization more easily.
#
# the url above is used by `nixos-generator` to generate the KubeVirt's qcow2 image file.
#
##############################################################################
{
imports = [
"${toString modulesPath}/profiles/qemu-guest.nix"
./qemu-guest.nix
];
config = {
# disable backups in the VM
services.btrbk.instances = lib.mkForce { };
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
boot.growPartition = true;
boot.kernelParams = [ "console=ttyS0" ];
boot.loader.grub.device = "/dev/vda";
services.qemuGuest.enable = true; # qemu-guest-agent
services.openssh.enable = true;
# we configure the host via nixos itself, so we don't need the cloud-init
services.cloud-init.enable = lib.mkForce false;
systemd.services."serial-getty@ttyS0".enable = true;
};
}

View File

@@ -0,0 +1,35 @@
{
modulesPath,
lib,
...
}:
##############################################################################
#
# Template for KubeVirt's VM, mainly based on:
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/kubevirt.nix
#
# We write our hardware-configuration.nix, so that we can do some customization more easily.
#
# the url above is used by `nixos-generator` to generate the KubeVirt's qcow2 image file.
#
##############################################################################
{
imports = [
"${toString modulesPath}/profiles/qemu-guest.nix"
];
config = {
# disable backups in the VM
services.btrbk.instances = lib.mkForce { };
boot.growPartition = true;
boot.kernelParams = [ "console=ttyS0" ];
boot.loader.grub.device = "/dev/vda";
services.qemuGuest.enable = true; # qemu-guest-agent
services.openssh.enable = true;
# we configure the host via nixos itself, so we don't need the cloud-init
services.cloud-init.enable = lib.mkForce false;
systemd.services."serial-getty@ttyS0".enable = true;
};
}