2023-08-06 22:08:38 +02:00
|
|
|
{ config, lib, pkgs, modulesPath, ... }: {
|
2023-08-06 00:45:08 +02:00
|
|
|
imports =
|
|
|
|
[
|
|
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
|
|
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
|
|
|
boot.kernelModules = [ ];
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
fileSystems."/" =
|
|
|
|
{
|
|
|
|
device = "none";
|
|
|
|
fsType = "tmpfs";
|
|
|
|
options = [ "defaults" "size=2G" "mode=755" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-label/BOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/nix" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-label/nix";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/nix/persist/swapfile";
|
|
|
|
size = 4 * 1024; # 4 GiB
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
}
|
|
|
|
|