Modularise config. Add sops-nix for secrets management.

This commit is contained in:
Fern Garden 2025-07-08 14:09:35 +08:00
parent 02fdb4707d
commit a348413d83
15 changed files with 211 additions and 119 deletions

View file

@ -0,0 +1,30 @@
{ lib, modulesPath, ... }:
{
# Import qemu guest configuration.
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
# Load kernel modules.
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
];
boot.kernelModules = [ "kvm-intel" ];
# Enable DHCP.
networking.useDHCP = lib.mkDefault true;
# Configure the bootloader.
boot.loader.grub = {
enable = true;
device = "/dev/sda";
};
# Enable QEMU guest agent
services.qemuGuest.enable = true;
}