Compare commits

...

10 Commits

Author SHA1 Message Date
Andreas Schaafsma
2048c12baa this does not 2024-11-13 05:22:44 +01:00
Andreas Schaafsma
96acd705cb this sorta worked 2024-11-13 05:22:21 +01:00
Andreas Schaafsma
ab2413d3c6 attempt to fix framebuffer corruption and random sleep issues 2024-11-13 03:12:10 +01:00
Andreas Schaafsma
c3b3bdd6c2 upgrade to beta driver 2024-11-13 03:11:08 +01:00
Andreas Schaafsma
e7c6413503 attempt to fix gamescope 2024-11-13 02:58:30 +01:00
Andreas Schaafsma
8f228a50bc test fbdev 2024-11-13 02:58:19 +01:00
Andreas Schaafsma
cccadc89c4 fix modeset by enabling nvidia-drm as a boot init module 2024-11-13 02:58:06 +01:00
Andreas Schaafsma
12d32846a2 attempt gamescope fix 2024-11-13 02:32:57 +01:00
Andreas Schaafsma
a5eafae831 fixed another renamed key warning 2024-11-13 02:32:43 +01:00
Andreas Schaafsma
e2fd2ba798 fix renamed key warning 2024-11-13 02:32:22 +01:00
5 changed files with 118 additions and 19 deletions

View File

@ -46,7 +46,13 @@
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.enable = true;
# services.xserver.displayManager.lightdm.enable = true;
# services.xserver.displayManager.autoLogin.enable = true;
# services.xserver.displayManager.autoLogin.user = "andreas";
# systemd.services."getty@tty1".enable = false;
# systemd.services."autovt@tty1".enable = false;
services.xserver.desktopManager.gnome.enable = true;
services.desktopManager.plasma6.enable = true;

View File

@ -33,6 +33,7 @@ in
# inherit system;
imports = [
./configuration.nix
./steam.nix
];
config = {
system.stateVersion = "24.05";
@ -55,13 +56,6 @@ in
];
};
# lib.my-namespace.home.stream-tools.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
gamescopeSession.enable = true;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
@ -88,6 +82,15 @@ in
pkgs.ntfsprogs
pkgs.my-namespace.udev-steelseries
pkgs.my-namespace.hello
# pkgs.nvtopPackages.nvidia
# pkgs.mesa
# pkgs.vulkan-loader
# pkgs.vulkan-validation-layers
# pkgs.vulkan-extension-layer
# pkgs.vulkan-tools
# pkgs.libva
# pkgs.libva-utils
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]
@ -107,7 +110,10 @@ in
services.openssh = {
enable = true;
passwordAuthentication = true;
settings.PasswordAuthentication = true;
# settings = {
# # passwordAuthentication = true;
# };
};
@ -123,4 +129,4 @@ in
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
};
}
}

View File

@ -10,7 +10,7 @@
./nvidia.nix
./acer-monitor-edid.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-amd" ];
boot.blacklistedKernelModules = [ ];

View File

@ -2,15 +2,21 @@
{
# Enable OpenGL
hardware.opengl = {
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
# Load nvidia driver for Xorg and Wayland
#boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_production ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.kernelParams = [
"nvidia-drm.fbdev=0"
"nvidia-drm.modeset=0"
"nvidia-drm.modeset=1"
# "nvidia_drm.modeset=1"
];
boot.blacklistedKernelModules = [
"i915"
@ -18,12 +24,19 @@
"nouveau"
];
services.xserver.videoDrivers = [ "nvidia" ];
boot.initrd.kernelModules = [ "nvidia" ];
boot.initrd.kernelModules = [
"nvidia"
"nvidia-drm"
"nvidia-modeset"
# "nvidia-uvm"
# "nvidia_modeset"
# "nvidia_uvm"
"i2c-nvidia_gpu"
];
#boot.initrd.kernelModules = [ "nvidia" ];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
@ -52,8 +65,10 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
# package = config.boot.kernelPackages.nvidiaPackages.production;
};
users.users.andreas = {
extraGroups = [ "video" "render" ];
};
#users.users.andreas = {
# extraGroups = [ "video" "render" ];
#};
}

View File

@ -0,0 +1,72 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# The system architecture for this host (eg. `x86_64-linux`).
system,
# The Snowfall Lib target for this system (eg. `x86_64-iso`).
target,
# A normalized name for the system target (eg. `iso`).
format,
# A boolean to determine whether this system is a virtual target using nixos-generators.
virtual,
# An attribute map of your defined hosts.
systems,
# All other arguments come from the system system.
config
, ...
}:{
config = {
programs.gamescope.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
gamescopeSession = {
enable = true;
env = {
WLR_RENDERER = "vulkan";
DXVK_HDR = "1 ";
ENABLE_GAMESCOPE_WSI = "1";
WINE_FULLSCREEN_FSR = "1";
# Games allegedly prefer X11
SDL_VIDEODRIVER = "x11";
};
args = [
"--xwayland-count 1"
"--expose-wayland"
"-e" # Enable steam integration
"--steam"
"--adaptive-sync"
"--hdr-enabled"
"--hdr-itm-enable"
# External monitor
"--prefer-output DP-3"
"--output-width 1920"
"--output-height 1080"
"-r 172"
# Laptop display
# "--prefer-output eDP-1"
# "--output-width 2560"
# "--output-height 1600"
# "-r 120"
"--prefer-vk-device 10de:1b81" # lspci -nn | grep VGA
];
};
};
};
}