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

@@ -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-"];
};
};
};

View File

@@ -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 = {