Modularise config. Add sops-nix for secrets management.
This commit is contained in:
parent
02fdb4707d
commit
a348413d83
15 changed files with 211 additions and 119 deletions
30
configuration/server/vm.nix
Normal file
30
configuration/server/vm.nix
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue