86 lines
1.9 KiB
Nix
86 lines
1.9 KiB
Nix
{ 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;
|
|
|
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
|
|
|
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 = [ "nvidia" ];
|
|
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
#powerManagement.enable = false;
|
|
open = false;
|
|
#nvidiaSettings = true;
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
|
|
services.xserver.deviceSection = ''
|
|
Option "AllowEmptyInitialConfiguration"
|
|
'';
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
mangohud
|
|
goverlay
|
|
vkbasalt
|
|
gamemode
|
|
];
|
|
|
|
custom.gaming.enable = true;
|
|
custom.gaming.enableXpadneo = false;
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PasswordAuthentication = true;
|
|
PermitRootLogin = "no";
|
|
};
|
|
};
|
|
}
|