1

AMD->Nvidia

This commit is contained in:
2023-10-15 11:57:06 +02:00
parent a0cc02f88f
commit b4d6d383e7
7 changed files with 48 additions and 34 deletions

View File

@ -28,7 +28,7 @@ general {
decoration {
rounding = 5
multisample_edges = on
# multisample_edges = on # Deprecated
blur {
enabled = true
@ -123,16 +123,16 @@ bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Reset the workspace positions after disabling and reenabling a monitor
bind = CTRL ALT, R, moveworkspacetomonitor, 1 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 2 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 3 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 4 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 5 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 6 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 7 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 8 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 9 HDMI-A-1
bind = CTRL ALT, R, moveworkspacetomonitor, 10 HDMI-A-2
bind = CTRL ALT, R, moveworkspacetomonitor, 1 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 2 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 3 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 4 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 5 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 6 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 7 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 8 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 9 DP-1
bind = CTRL ALT, R, moveworkspacetomonitor, 10 HDMI-A-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow

View File

@ -22,7 +22,7 @@ rec {
kb-variant = "altgr-intl";
monitors = {
"HDMI-A-1" = {
"DP-1" = {
width = 2560;
height = 1440;
rate = 144;
@ -31,7 +31,7 @@ rec {
scale = 1;
};
"HDMI-A-2" = {
"HDMI-A-1" = {
width = 1920;
height = 1080;
rate = 60;
@ -42,8 +42,8 @@ rec {
};
workspaces = {
"HDMI-A-1" = [1 2 3 4 5 6 7 8 9];
"HDMI-A-2" = [10];
"DP-1" = [1 2 3 4 5 6 7 8 9];
"HDMI-A-1" = [10];
};
autostart = [
@ -99,7 +99,7 @@ rec {
# };
# };
waybar.monitor = "HDMI-A-1";
waybar.monitor = "DP-1";
};
home.packages = with pkgs; [

View File

@ -39,7 +39,8 @@ in {
})
(optionalAttrs cfg.vaapi {
LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
# LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
LIBVA_DRIVER_NAME = "nvidia";
MOZ_DISABLE_RDD_SANDBOX = 1;
})
];

View File

@ -169,11 +169,11 @@ in {
df = "duf";
disksummary = "duf";
})
(abbrify pkgs.exa {
ls = "exa --color always --group-directories-first -F --git --icons"; # color-ls
lsl = "exa --color always --group-directories-first -F -l --git --icons --octal-permissions";
lsa = "exa --color always --group-directories-first -F -l -a --git --icons --octal-permissions";
tre = "exa --color always --group-directories-first -F -T -L 2 ---icons";
(abbrify pkgs.eza {
ls = "eza --color always --group-directories-first -F --git --icons"; # color-ls
lsl = "eza --color always --group-directories-first -F -l --git --icons --octal-permissions";
lsa = "eza --color always --group-directories-first -F -l -a --git --icons --octal-permissions";
tre = "eza --color always --group-directories-first -F -T -L 2 ---icons";
})
(abbrify pkgs.fd {find = "fd";})
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})

View File

@ -183,7 +183,7 @@ with mylib.networking; {
programs.hyprland = {
enable = true;
enableNvidiaPatches = false;
enableNvidiaPatches = true;
};
# XDG
@ -399,7 +399,7 @@ with mylib.networking; {
flatpak.enable = true; # Not quite the nix style but useful for bottles/proprietary stuff/steam/gaming
fstrim.enable = true; # SSD
fwupd.enable = true; # Device firmware (I don't think I have any supported devices)
locate.enable = true; # Periodically update index
# locate.enable = true; # Periodically update index
ntp.enable = true; # Clock sync
gvfs = { # Network shares
enable = true;

View File

@ -56,6 +56,14 @@
"asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w="
"92.223.89.133"
);
wg0-kh-8 = (
mylib.networking.mkWireguardService
"wg0-kh-8"
"proton-kh-8.key"
"D4M0O60wCBf1nYWOmXRfK7IpgG7VBBwQLeWVFLIqFG4="
"188.215.235.82"
);
};
};
};
@ -71,7 +79,7 @@
layout = "us";
xkbVariant = "altgr-intl";
# videoDrivers = [ "nvidia" ]; # NVIDIA
videoDrivers = ["amdgpu"];
videoDrivers = [ "nvidia" ]; # NVIDIA
# videoDrivers = ["amdgpu"];
};
}

View File

@ -15,8 +15,8 @@
# Enable early Nvidia kernel modesetting
# https://wiki.archlinux.org/title/GDM#GDM_ignores_Wayland_and_uses_X.Org_by_default (not fixed by this)
# https://wiki.archlinux.org/title/Kernel_mode_setting#Early_KMS_start
# initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; # NVIDIA
initrd.kernelModules = ["amdgpu"]; # Initrd modules are always loaded, e.g. when they are required to mount the rootfs
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; # NVIDIA
# initrd.kernelModules = ["amdgpu"]; # Initrd modules are always loaded, e.g. when they are required to mount the rootfs
# kernelModules = ["kvm-intel" "iwlwifi"];
kernelModules = ["kvm-amd"];
@ -63,7 +63,7 @@
# networking.wireless.iwd.enable = true;
# networking.networkmanager.wifi.backend = "iwd";
nixpkgs.config.allowUnfree = true;
# nixpkgs.config.allowUnfree = true;
hardware = {
# Use all redistributable firmware (i.e. nonfree)
@ -72,7 +72,12 @@
# cpu.intel.updateMicrocode = true;
cpu.amd.updateMicrocode = true;
# nvidia.modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
nvidia = {
modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
open = true;
nvidiaSettings = true;
};
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
opengl = {
enable = true;
@ -86,16 +91,16 @@
# amdvlk # RADV (mesa) and AMDVLK (amd) can be used simultaneously
# OpenCL
rocm-opencl-icd
rocm-opencl-runtime
# rocm-opencl-icd
# rocm-opencl-runtime
# rocm-runtime # Wiki doesn't mention this, but it exists...
# TODO: Disabled for the moment, because hardware acceleration crashes AMDGPU driver
# VAAPI/VDPAU: https://nixos.wiki/wiki/Accelerated_Video_Playback
vaapiVdpau # Taken from wiki
libvdpau-va-gl # Taken from wiki
libvdpau # NOTE: Don't know if needed/where it belongs...
libva # NOTE: Don't know if needed/where it belongs...
# libvdpau # NOTE: Don't know if needed/where it belongs...
# libva # NOTE: Don't know if needed/where it belongs...
];
};