From 14eaee2bbcf64285645c2727a2c95a0cfe0825bd Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 22 May 2025 09:52:53 +0300 Subject: [PATCH] desktop/niri: switch polkit-gnome to soteria, update layout, keybinds Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 16 +++++----- modules/home/desktop/niri/niri.nix | 42 ++++++++++++++++++--------- modules/nixos/desktop/niri.nix | 1 + 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index d1abcfe..782561a 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -161,14 +161,14 @@ in { Service = mkDefault graphicalService.Service; }; - gnome-polkit-agent = mkGraphicalService { - Service = - graphicalService.Service - // { - Type = "simple"; - ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; - }; - }; + # gnome-polkit-agent = mkGraphicalService { + # Service = + # graphicalService.Service + # // { + # Type = "simple"; + # ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; + # }; + # }; }; }; }; diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 76ccef8..a053616 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -104,15 +104,11 @@ in { keyboard { xkb { layout "us,ua" - ${ - if (hostName == "dunamis" || hostName == "legion") - then "// variant \"colemak_dh_ortho,\"" - else "variant \"colemak_dh_ortho,\"" - } - } - repeat-delay 200 - repeat-rate 50 - track-layout "global" + variant "colemak_dh_ortho," + } + repeat-delay 200 + repeat-rate 50 + track-layout "global" } touchpad { // off @@ -174,6 +170,7 @@ in { proportion 0.66667 } + background-color "transparent" // default-column-width { proportion 0.9; } default-column-width { proportion 0.5; } tab-indicator { @@ -227,6 +224,20 @@ in { } } + // Make the wallpaper stationary, rather than moving with workspaces. + layer-rule { + // This is for swaybg; change for other wallpaper tools. + // Find the right namespace by running niri msg layers. + match namespace="^wallpaper$" + place-within-backdrop true + } + + // Optionally, disable the workspace shadows in the overview. + overview { + workspace-shadow { + off + } + } screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" animations { @@ -284,6 +295,8 @@ in { Mod+Ctrl+M { fullscreen-window; } Mod+Ctrl+G { toggle-window-floating; } + Mod+Ctrl+Shift+M { toggle-windowed-fullscreen; } + Mod+Minus { set-column-width "-10%"; } Mod+Equal { set-column-width "+10%"; } Mod+Comma { set-column-width "-10%"; } @@ -291,12 +304,15 @@ in { Mod+Shift+Comma { set-window-height "-10%"; } Mod+Shift+Period { set-window-height "+10%"; } - Mod+Escape { switch-layout "next"; } + Mod+Space { switch-layout "next"; } + + Mod+Ctrl+Space repeat=false { toggle-overview; } Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; } - Mod+Space repeat=false { spawn "${launcher}"; } - Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } - Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; } + Mod+BackSpace repeat=false { spawn "${launcher}"; } + Mod+A repeat=false { spawn "${launcher}"; } + Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } + Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; } Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; } diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri.nix index 3f08848..fe0fe9f 100644 --- a/modules/nixos/desktop/niri.nix +++ b/modules/nixos/desktop/niri.nix @@ -19,6 +19,7 @@ in { gcr_4 ]; fonts.fontDir.enable = true; + security.soteria.enable = true; security.pam = { services.greetd.enableGnomeKeyring = true; services.gtklock = {};