From b4d6d383e765c75d2c090e2a5f566ff756048207 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Sun, 15 Oct 2023 11:57:06 +0200 Subject: [PATCH] AMD->Nvidia --- config/hyprland/hyprland.conf | 22 ++++++++++----------- home/christoph/nixinator/default.nix | 10 +++++----- home/modules/firefox/default.nix | 3 ++- home/modules/fish/default.nix | 10 +++++----- system/default.nix | 4 ++-- system/nixinator/default.nix | 12 +++++++++-- system/nixinator/hardware-configuration.nix | 21 ++++++++++++-------- 7 files changed, 48 insertions(+), 34 deletions(-) diff --git a/config/hyprland/hyprland.conf b/config/hyprland/hyprland.conf index 5a1447b9..d4899264 100644 --- a/config/hyprland/hyprland.conf +++ b/config/hyprland/hyprland.conf @@ -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 diff --git a/home/christoph/nixinator/default.nix b/home/christoph/nixinator/default.nix index 25335177..48792e42 100644 --- a/home/christoph/nixinator/default.nix +++ b/home/christoph/nixinator/default.nix @@ -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; [ diff --git a/home/modules/firefox/default.nix b/home/modules/firefox/default.nix index 37498175..b359b5ee 100644 --- a/home/modules/firefox/default.nix +++ b/home/modules/firefox/default.nix @@ -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; }) ]; diff --git a/home/modules/fish/default.nix b/home/modules/fish/default.nix index c1955715..4553ef5a 100644 --- a/home/modules/fish/default.nix +++ b/home/modules/fish/default.nix @@ -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 {}'";}) diff --git a/system/default.nix b/system/default.nix index f6318f68..bd68334c 100644 --- a/system/default.nix +++ b/system/default.nix @@ -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; diff --git a/system/nixinator/default.nix b/system/nixinator/default.nix index a026667c..f2f3472c 100644 --- a/system/nixinator/default.nix +++ b/system/nixinator/default.nix @@ -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"]; }; } diff --git a/system/nixinator/hardware-configuration.nix b/system/nixinator/hardware-configuration.nix index 1364ed5b..7c2fe85b 100644 --- a/system/nixinator/hardware-configuration.nix +++ b/system/nixinator/hardware-configuration.nix @@ -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... ]; };