fix: Wayland fixes

- Use 144hz.
- Fix XAuthority issues.
This commit is contained in:
Madeleine Sydney
2025-03-27 16:02:11 -06:00
parent 319e213eba
commit 370687f1e2
5 changed files with 22 additions and 18 deletions

View File

@@ -65,11 +65,11 @@
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://niri.cachix.org" # WAIT4NIRI "https://niri.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" # WAIT4NIRI "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
]; ];
}; };
} }

View File

@@ -69,7 +69,7 @@
hardware.nvidia.open = false; hardware.nvidia.open = false;
services.xserver = { services.xserver = {
enable = true; # enable = true;
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
xkb = { xkb = {
layout = "us"; layout = "us";
@@ -77,8 +77,11 @@
}; };
}; };
services.displayManager.sddm.enable = true; # WAIT4NIRI services.displayManager.sddm = {
# services.desktopManager.plasma6.enable = true; # WAIT4NIRI enable = true;
wayland.enable = true;
autoNumlock = true;
};
services.libinput = { services.libinput = {
enable = true; enable = true;

View File

@@ -22,6 +22,8 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
stylix.targets.swaylock.enable = true; stylix.targets.swaylock.enable = true;
services.polkit-gnome.enable = true;
programs.niri = { programs.niri = {
# Activates some Nixpkgs patches to help run Electron applications under # Activates some Nixpkgs patches to help run Electron applications under
# Wayland. # Wayland.
@@ -51,7 +53,7 @@ in {
outputs."DP-1" = { outputs."DP-1" = {
mode.width = 2560; mode.width = 2560;
mode.height = 1440; mode.height = 1440;
mode.refresh = 144.0; mode.refresh = 143.912;
scale = 1; scale = 1;
}; };
layout = { layout = {
@@ -127,7 +129,7 @@ in {
clip-to-geometry = true; clip-to-geometry = true;
} }
]; ];
binds = with config.lib.niri.actions; { binds = {
"Mod+Q".action.close-window = []; "Mod+Q".action.close-window = [];
"Mod+Shift+Q".action.quit = []; "Mod+Shift+Q".action.quit = [];
"Mod+Ctrl+L".action.spawn = ["${pkgs.swaylock}/bin/swaylock"]; "Mod+Ctrl+L".action.spawn = ["${pkgs.swaylock}/bin/swaylock"];
@@ -203,10 +205,10 @@ in {
"Mod+Shift+R".action.switch-preset-window-height = []; "Mod+Shift+R".action.switch-preset-window-height = [];
"Mod+Ctrl+R".action.reset-window-height = []; "Mod+Ctrl+R".action.reset-window-height = [];
"XF86AudioRaiseVolume".action = "XF86AudioRaiseVolume".action.spawn =
spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
"XF86AudioLowerVolume".action = "XF86AudioLowerVolume".action.spawn =
spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
}; };
}; };
}; };

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }@inputs:
let let
cfg = config.sydnix.niri; cfg = config.sydnix.niri;
@@ -7,7 +7,11 @@ in {
lib.mkEnableOption "Niri"; lib.mkEnableOption "Niri";
config = lib.mkIf cfg.enable { 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. # Necessary for e.g. screensharing.
xdg.portal = { xdg.portal = {

View File

@@ -41,11 +41,6 @@ in lib.mkMerge [
# REVIEW: I think it may be preferable to persist a few individual files # REVIEW: I think it may be preferable to persist a few individual files
# under ~/.ssh, rather than the whole directory. # under ~/.ssh, rather than the whole directory.
".ssh" ".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"
]; ];
}; };
} }