From 370687f1e288c9e5e72fa2e4074e5162e6136899 Mon Sep 17 00:00:00 2001 From: Madeleine Sydney Date: Thu, 27 Mar 2025 16:02:11 -0600 Subject: [PATCH] fix: Wayland fixes - Use 144hz. - Fix XAuthority issues. --- flake.nix | 4 ++-- hosts/sydpc/configuration.nix | 9 ++++++--- modules/home/users/crumb/niri.nix | 14 ++++++++------ modules/nixos/niri.nix | 8 ++++++-- users/crumb/files.nix | 5 ----- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index 9e43649..e942670 100755 --- a/flake.nix +++ b/flake.nix @@ -65,11 +65,11 @@ nixConfig = { extra-substituters = [ "https://nix-community.cachix.org" - "https://niri.cachix.org" # WAIT4NIRI + "https://niri.cachix.org" ]; extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" # WAIT4NIRI + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" ]; }; } diff --git a/hosts/sydpc/configuration.nix b/hosts/sydpc/configuration.nix index 1927a99..de8e4d9 100644 --- a/hosts/sydpc/configuration.nix +++ b/hosts/sydpc/configuration.nix @@ -69,7 +69,7 @@ hardware.nvidia.open = false; services.xserver = { - enable = true; + # enable = true; videoDrivers = [ "nvidia" ]; xkb = { layout = "us"; @@ -77,8 +77,11 @@ }; }; - services.displayManager.sddm.enable = true; # WAIT4NIRI - # services.desktopManager.plasma6.enable = true; # WAIT4NIRI + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + autoNumlock = true; + }; services.libinput = { enable = true; diff --git a/modules/home/users/crumb/niri.nix b/modules/home/users/crumb/niri.nix index d459e7a..2f44703 100644 --- a/modules/home/users/crumb/niri.nix +++ b/modules/home/users/crumb/niri.nix @@ -22,6 +22,8 @@ in { config = lib.mkIf cfg.enable { stylix.targets.swaylock.enable = true; + services.polkit-gnome.enable = true; + programs.niri = { # Activates some Nixpkgs patches to help run Electron applications under # Wayland. @@ -51,7 +53,7 @@ in { outputs."DP-1" = { mode.width = 2560; mode.height = 1440; - mode.refresh = 144.0; + mode.refresh = 143.912; scale = 1; }; layout = { @@ -127,7 +129,7 @@ in { clip-to-geometry = true; } ]; - binds = with config.lib.niri.actions; { + binds = { "Mod+Q".action.close-window = []; "Mod+Shift+Q".action.quit = []; "Mod+Ctrl+L".action.spawn = ["${pkgs.swaylock}/bin/swaylock"]; @@ -203,10 +205,10 @@ in { "Mod+Shift+R".action.switch-preset-window-height = []; "Mod+Ctrl+R".action.reset-window-height = []; - "XF86AudioRaiseVolume".action = - spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; - "XF86AudioLowerVolume".action = - spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; + "XF86AudioRaiseVolume".action.spawn = + ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"]; + "XF86AudioLowerVolume".action.spawn = + ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"]; }; }; }; diff --git a/modules/nixos/niri.nix b/modules/nixos/niri.nix index 29d72d4..145aa52 100644 --- a/modules/nixos/niri.nix +++ b/modules/nixos/niri.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, ... }@inputs: let cfg = config.sydnix.niri; @@ -7,7 +7,11 @@ in { lib.mkEnableOption "Niri"; config = lib.mkIf cfg.enable { - programs.niri.enable = true; + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; + programs.niri = { + enable = true; + package = pkgs.niri-unstable; + }; # Necessary for e.g. screensharing. xdg.portal = { diff --git a/users/crumb/files.nix b/users/crumb/files.nix index 0e1ac4a..0eb8806 100755 --- a/users/crumb/files.nix +++ b/users/crumb/files.nix @@ -41,11 +41,6 @@ in lib.mkMerge [ # REVIEW: I think it may be preferable to persist a few individual files # under ~/.ssh, rather than the whole directory. ".ssh" - # FIXME: This is only temporary. KDE Plasma can be a PITA, - # unpredictably scattering configuration files all about the file - # system. Until we switch to Niri, we'll just persist the whole - # directory. WAIT4NIRI - # ".config" ]; }; }