stable x11 config
This commit is contained in:
parent
72cac1e8c6
commit
f7823d9ad3
12
flake.lock
generated
12
flake.lock
generated
@ -149,11 +149,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733558619,
|
"lastModified": 1733621779,
|
||||||
"narHash": "sha256-+hpXjj67bWfr8Z4JP32CPqvoqO5hkTNyRZLA5SB6Zmc=",
|
"narHash": "sha256-oeBPiHmg8T/Qsf4qMkUqOrn6/xkJwREGo1jA+4xDssk=",
|
||||||
"owner": "lilyinstarlight",
|
"owner": "lilyinstarlight",
|
||||||
"repo": "nixos-cosmic",
|
"repo": "nixos-cosmic",
|
||||||
"rev": "313f9b0d8cb2ec8bec0f4d5170c3fda41d49f58c",
|
"rev": "b9ec66ed4e1430061ca044e938bb10f3ab629ba3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -299,11 +299,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733452419,
|
"lastModified": 1733538766,
|
||||||
"narHash": "sha256-eh2i2GtqdWVOP7yjiWtB8FMUWktCZ4vjo81n6g5mSiE=",
|
"narHash": "sha256-FEDfBpM82XGdHDbLDJC4lV+QXSVN1rERt1MqtBGJZds=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "020701e6057992329a7cfafc6e3c5d5658bbcf79",
|
"rev": "66526479b295ad238843a8a7367d2da7ec102757",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -17,9 +17,9 @@ in
|
|||||||
|
|
||||||
# Enable NVIDIA driver for X11 and Wayland
|
# Enable NVIDIA driver for X11 and Wayland
|
||||||
# without modesetting, x server will be run by nvidia
|
# without modesetting, x server will be run by nvidia
|
||||||
services.xserver.videoDrivers = [
|
services.xserver.videoDrivers = [
|
||||||
"amdgpu"
|
"amdgpu"
|
||||||
# "modesetting"
|
#"modesetting"
|
||||||
"nvidia"
|
"nvidia"
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -29,6 +29,11 @@ in
|
|||||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
||||||
|
|
||||||
|
# Enable Switcheroo
|
||||||
|
services.switcherooControl.enable = true;
|
||||||
|
|
||||||
# Use Beta Driver Package
|
# Use Beta Driver Package
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
|
||||||
|
|
||||||
@ -39,20 +44,19 @@ in
|
|||||||
# Enable required Kernel Modules
|
# Enable required Kernel Modules
|
||||||
boot.initrd.kernelModules = [
|
boot.initrd.kernelModules = [
|
||||||
"amdgpu"
|
"amdgpu"
|
||||||
# "modesetting"
|
"nvidia"
|
||||||
# "nvidia"
|
# # "nvidia-drm"
|
||||||
# "nvidia-drm"
|
# # "nvidiafb"
|
||||||
# "nvidiafb"
|
# # # "nvidia-uvm"
|
||||||
# # "nvidia-uvm"
|
# # "nvidia-modeset"
|
||||||
# "nvidia-modeset"
|
# # "i2c-nvidia_gpu"
|
||||||
# "i2c-nvidia_gpu"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
# "amdgpu.modeset=1"
|
# "amdgpu.modeset=1"
|
||||||
# "nvidia-drm.fbdev=1"
|
# "nvidia-drm.fbdev=1"
|
||||||
# "nvidia-drm.modeset=0"
|
# "nvidia-drm.modeset=1"
|
||||||
# # "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
# # "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
||||||
"amd_iommu=on"
|
"amd_iommu=on"
|
||||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
||||||
@ -83,7 +87,7 @@ in
|
|||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
# Modesetting is required.
|
# Modesetting is required.
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
@ -111,7 +115,7 @@ in
|
|||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
nvidiaPersistenced = true;
|
||||||
forceFullCompositionPipeline = false;
|
forceFullCompositionPipeline = false;
|
||||||
|
|
||||||
prime = {
|
prime = {
|
||||||
@ -123,12 +127,11 @@ in
|
|||||||
# reverseSync.enable = false;
|
# reverseSync.enable = false;
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
# Make sure to use the correct Bus ID values for your system!
|
||||||
# intelBusId = "PCI:0:2:0";
|
# intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:01:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add user to extra groups
|
# Add user to extra groups
|
||||||
users.users.andreas = {
|
users.users.andreas = {
|
||||||
extraGroups = [ "video" "render" ];
|
extraGroups = [ "video" "render" ];
|
||||||
|
|||||||
@ -42,29 +42,46 @@
|
|||||||
LC_TIME = "nl_NL.UTF-8";
|
LC_TIME = "nl_NL.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
services.xserver = {
|
||||||
services.xserver.enable = true;
|
enable = true; # Enable the deprecated X11 teletype terminal connection system.
|
||||||
|
# Specify first device section to use nvidia GPU
|
||||||
# Enable the GNOME Desktop Environment.
|
#deviceSection = ''
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
# # Pick the 1070
|
||||||
services.xserver.displayManager.defaultSession = "gnome";
|
# BusID "PCI:1:0:0"
|
||||||
# services.xserver.displayManager.lightdm.enable = true;
|
#'';
|
||||||
# services.xserver.displayManager.autoLogin.enable = true;
|
desktopManager = {
|
||||||
|
# Disable xterm
|
||||||
|
xterm.enable = false;
|
||||||
|
# Enable xfce session
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
# Enable Gnome Session
|
||||||
|
gnome.enable = true;
|
||||||
|
# Disable fuckshit plasma
|
||||||
|
plasma6.enable = false;
|
||||||
|
};
|
||||||
|
# Configure Display Manager
|
||||||
|
displayManager = {
|
||||||
|
gdm.enable = false;
|
||||||
|
sddm.enable = false;
|
||||||
|
# Enable lightdm
|
||||||
|
lightdm.enable = true;
|
||||||
|
defaultSession = "xfce";
|
||||||
|
};
|
||||||
|
# Configure keymap in X11
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "intl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# services.xserver.displayManager.defaultSession = "gnome-x11"; # services.xserver.displayManager.autoLogin.enable = true;
|
||||||
# services.xserver.displayManager.autoLogin.user = "andreas";
|
# services.xserver.displayManager.autoLogin.user = "andreas";
|
||||||
# systemd.services."getty@tty1".enable = false;
|
# systemd.services."getty@tty1".enable = false;
|
||||||
# systemd.services."autovt@tty1".enable = false;
|
# systemd.services."autovt@tty1".enable = false;
|
||||||
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
programs.ssh.askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
programs.ssh.askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "intl";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure console keymap
|
# Configure console keymap
|
||||||
console.keyMap = "us-acentos";
|
console.keyMap = "us-acentos";
|
||||||
|
|
||||||
@ -101,7 +118,8 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
# wget
|
# wget
|
||||||
pkgs.gnome-tweaks
|
xfce.xfce4-whiskermenu-plugin
|
||||||
|
gnome-tweaks
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot.kernelParams = [ "drm.edid_firmware=DP-6:edid/edid.bin" ];
|
boot.kernelParams = [ "drm.edid_firmware=DP-1:edid/edid.bin" ];
|
||||||
|
|
||||||
hardware.firmware = [
|
hardware.firmware = [
|
||||||
(
|
(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user