From 0416e7a115c7094a436d326e16e64720df68aa14 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Mon, 20 Jun 2022 13:17:03 +0000 Subject: Add VM host --- hosts/vm/hardware.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 hosts/vm/hardware.nix (limited to 'hosts/vm/hardware.nix') diff --git a/hosts/vm/hardware.nix b/hosts/vm/hardware.nix new file mode 100644 index 0000000..5f331f1 --- /dev/null +++ b/hosts/vm/hardware.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ ]; + + boot = { + initrd = { + availableKernelModules = + [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + }; + kernelModules = [ ]; + extraModulePackages = [ ]; + kernelParams = [ "net.ifnames=0" "biosdevname=0" ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only + + swapDevices = [ ]; + + services.xserver = { + # Enable touchpad support (enabled default in most desktopManager). + libinput.enable = true; + }; + + hardware = { + opengl = { + enable = true; + driSupport = true; + }; + }; + virtualisation.virtualbox.guest.enable = true; +} -- cgit 1.4.1