update vmgpupassthrought

This commit is contained in:
Amaury
2026-03-12 13:29:01 +01:00
parent 8551f28c1a
commit c7262c7c68
5 changed files with 36 additions and 11 deletions

View File

@@ -24,6 +24,8 @@
};
boot.loader.efi.canTouchEfiVariables = false;
boot.blacklistedKernelModules = [ "nouveau" ];
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
@@ -47,16 +49,20 @@
# 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;
#powerManagement.enable = false;
open = false;
nvidiaSettings = true;
#nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
services.xserver.deviceSection = ''
Option "AllowEmptyInitialConfiguration"
'';
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
environment.systemPackages = with pkgs; [
@@ -68,4 +74,12 @@
custom.gaming.enable = true;
custom.gaming.enableXpadneo = false;
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
PermitRootLogin = "no";
};
};
}

View File

@@ -1,6 +1,6 @@
# Do not modify this file directly on every rebuild. It should contain host
# specific hardware/VM configuration for VMGaming (Proxmox guest).
{ lib, modulesPath, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [
@@ -10,18 +10,20 @@
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.extraModulePackages = with config.boot.kernelPackages; [ xone ];
boot.kernelParams = [ "console=ttyS0,115200" ];
services.getty.autologinUser = null;
# Update these labels to match your VM disks if they differ.
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
device = "/dev/sda2";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
device = "/dev/sda1";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
# options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
@@ -29,5 +31,7 @@
networking.useDHCP = lib.mkDefault true;
services.qemuGuest.enable = true;
hardware.xone.enable = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -56,5 +56,9 @@
sops
age
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCMzLza+1iFSUgZaPzEwpRNW/CvcsbXh8vJ9RevwFntNZdZIVc/j5OLRy+GOojlZdar070PkKDO+Pmtqu1uQ4XE+onqmsxom5JGyYaSScB3l33CLL2jBT7mBqBOVDuTBj3ACLT8fS1eUolI7erShvIH9VUvrg83bZ2CvgA/DjJLHfVCpvx9EsG0Q00k27LNU7yXga8sjK1YikA+o1bKTWavCGOWkZMFXOVeEDR+arOQ440s6f6eg7C+30V02ijRLA6pWFAkj2/fMaD+44IPMVjOj96vvPUJrlL1N7BDPxBlj1rrB35+pUkpVIN4B0etqnkrJIV+IxtmSpkNHr52Y7nkTu3mOWn1P0DcOdR5OA8JZRbSkbL/QW4GzFWs3eN7CMOMwKQdO+1J/wL4U7qrmKEYwcNaprqlDF0SIPp0+l/VWNMe6uK0r5iZwp355PUSR+Zc5skf74wMsZ1LokUlihdI+E6TNGvmDgjqKx6OrI3dyP/eW7xtR7KvbdoaUjy8AE8= alice@nixos"
];
};
}

View File

@@ -45,6 +45,8 @@
ntfs3g
zip
unzip
scream
];
fonts.packages = with pkgs; [

View File

@@ -20,8 +20,9 @@
xss-lock
dex
rofi
i3status
i3blocks
# i3status
# i3blocks
polybar
oh-my-posh
glances
arandr