add vm proxmox
This commit is contained in:
71
configuration-vmgaming.nix
Normal file
71
configuration-vmgaming.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hosts/vmgaming/configuration.nix
|
||||
|
||||
./modules/nixos/base.nix
|
||||
./modules/nixos/desktop-i3.nix
|
||||
./modules/nixos/parsec.nix
|
||||
|
||||
./modules/laptop/users.nix
|
||||
./modules/laptop/gaming.nix
|
||||
];
|
||||
|
||||
networking.hostName = "VMGaming";
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
# Proxmox VM: boot in UEFI mode without touching host EFI variables.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Gaming VM guest optimizations
|
||||
programs.gamemode.enable = true;
|
||||
programs.gamescope.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# NVIDIA passthrough guest defaults.
|
||||
# If you pass through an AMD GPU instead, replace with:
|
||||
# services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
goverlay
|
||||
vkbasalt
|
||||
gamemode
|
||||
];
|
||||
|
||||
custom.gaming.enable = true;
|
||||
custom.gaming.enableXpadneo = false;
|
||||
}
|
||||
Reference in New Issue
Block a user