52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
|
{ config, lib, pkgs, modulesPath, ... }:
|
||
|
|
||
|
{
|
||
|
imports = [
|
||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||
|
];
|
||
|
|
||
|
boot = {
|
||
|
kernelModules = [ ];
|
||
|
extraModulePackages = [ ];
|
||
|
kernelParams = [ "ip=dhcp" ];
|
||
|
initrd = {
|
||
|
availableKernelModules = [ "aesni_intel" "ata_piix" "sd_mod" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
|
||
|
kernelModules = [ ];
|
||
|
network.enable = true; # remote unlocking
|
||
|
luks.devices."root".device = "/dev/disk/by-uuid/df2ff903-e531-4a4f-9d05-e35d54255d39";
|
||
|
};
|
||
|
loader.grub.device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||
|
};
|
||
|
|
||
|
fileSystems = {
|
||
|
"/" = {
|
||
|
device = "/dev/disk/by-uuid/11a3adfc-f2a4-456e-9d51-e42f6cddf4f4";
|
||
|
fsType = "btrfs";
|
||
|
options = [ "compress=zstd" "discard" "noatime" ];
|
||
|
};
|
||
|
"/boot" = {
|
||
|
device = "/dev/disk/by-uuid/3fe3bc0e-c947-4770-b070-510db8a0f973";
|
||
|
fsType = "ext2";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking = {
|
||
|
useDHCP = false;
|
||
|
usePredictableInterfaceNames = false;
|
||
|
interfaces.eth0 = {
|
||
|
useDHCP = true;
|
||
|
ipv6.addresses = lib.singleton {
|
||
|
address = "2a02:c206:3008:9564::1";
|
||
|
prefixLength = 64;
|
||
|
};
|
||
|
};
|
||
|
defaultGateway6 = {
|
||
|
address = "fe80::1";
|
||
|
interface = "eth0";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# no smart on qemu disk
|
||
|
services.smartd.enable = false;
|
||
|
}
|