summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-01-14 11:30:32 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-01-14 11:30:32 +0100
commit21b52a31e1eff5c8142f26e091fde083c21db55f (patch)
tree650eb693d91b353c866c42dfae49b7c5daee5ca9 /accounts/gkleen@sif/niri/default.nix
parentbef130240c10b90d912aa06239402a6ad98867fe (diff)
downloadnixos-21b52a31e1eff5c8142f26e091fde083c21db55f.tar
nixos-21b52a31e1eff5c8142f26e091fde083c21db55f.tar.gz
nixos-21b52a31e1eff5c8142f26e091fde083c21db55f.tar.bz2
nixos-21b52a31e1eff5c8142f26e091fde083c21db55f.tar.xz
nixos-21b52a31e1eff5c8142f26e091fde083c21db55f.zip
niri
Diffstat (limited to 'accounts/gkleen@sif/niri/default.nix')
-rw-r--r--accounts/gkleen@sif/niri/default.nix139
1 files changed, 139 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
new file mode 100644
index 00000000..6a8d10a0
--- /dev/null
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -0,0 +1,139 @@
1{ config, pkgs, lib, ... }:
2let
3 niri = config.programs.niri.package;
4 terminal = lib.getExe config.programs.kitty.package;
5 lightctl = lib.getExe' config.services.avizo.package "lightctl";
6 volumectl = lib.getExe' config.services.avizo.package "volumectl";
7 dunstctl = lib.getExe' config.services.dunst.package "dunstctl";
8in {
9 imports = [
10 ./waybar.nix
11 ];
12
13 config = {
14 systemd.user.services.xwayland-satellite = {
15 Unit = {
16 BindsTo = [ "graphical-session.target" ];
17 PartOf = [ "graphical-session.target" ];
18 After = [ "graphical-session.target" ];
19 Requisite = [ "graphical-session.target" ];
20 };
21 Service = {
22 Type = "notify";
23 NotifyAccess = "all";
24 ExecStart = lib.getExe pkgs.xwayland-satellite-unstable;
25 StandardOutput = "journal";
26 };
27 Install = {
28 WantedBy = [ "graphical-session.target" ];
29 };
30 };
31
32 programs.niri.settings = {
33 prefer-no-csd = true;
34 screenshot-path = "${config.home.homeDirectory}/screenshots";
35
36 input = {
37 keyboard.xkb = {
38 layout = "us,";
39 variant = "dvp,";
40 options = "compose:caps,grp:win_space_toggle";
41 };
42 };
43
44 environment = {
45 NIXOS_OZONE_WL = "1";
46 QT_QPA_PLATFORM = "wayland";
47 GDK_BACKEND = "wayland";
48 SDL_VIDEODRIVER = "wayland";
49 };
50
51 cursor.hide-when-typing = true;
52
53 binds = with config.lib.niri.actions; {
54 "Mod+Return".action = spawn terminal;
55 "Mod+Q".action = close-window;
56 "Mod+D".action = spawn (lib.getExe config.programs.fuzzel.package);
57 "Mod+Shift+D".action = spawn (lib.getExe config.programs.fuzzel.package) "--list-executables-in-path";
58
59 "Mod+H".action = focus-column-left;
60 "Mod+T".action = focus-window-down;
61 "Mod+N".action = focus-window-up;
62 "Mod+S".action = focus-column-right;
63
64 "Mod+Shift+H".action = move-column-left;
65 "Mod+Shift+T".action = move-window-down;
66 "Mod+Shift+N".action = move-window-up;
67 "Mod+Shift+S".action = move-column-right;
68
69 "Mod+Control+H".action = focus-monitor-left;
70 "Mod+Control+T".action = focus-monitor-down;
71 "Mod+Control+N".action = focus-monitor-up;
72 "Mod+Control+S".action = focus-monitor-right;
73
74 "Mod+Shift+Control+H".action = move-workspace-to-monitor-left;
75 "Mod+Shift+Control+T".action = move-workspace-to-monitor-down;
76 "Mod+Shift+Control+N".action = move-workspace-to-monitor-up;
77 "Mod+Shift+Control+S".action = move-workspace-to-monitor-right;
78
79 "Mod+G".action = focus-workspace-down;
80 "Mod+C".action = focus-workspace-up;
81
82 "Mod+Control+G".action = move-column-to-workspace-down;
83 "Mod+Control+C".action = move-column-to-workspace-up;
84
85 "Mod+Shift+G".action = move-workspace-down;
86 "Mod+Shift+C".action = move-workspace-up;
87
88 "Mod+M".action = consume-window-into-column;
89 "Mod+W".action = expel-window-from-column;
90
91 "Mod+F".action = maximize-column;
92 "Mod+Shift+F".action = fullscreen-window;
93
94 "Mod+Space".action = switch-focus-between-floating-and-tiling;
95 "Mod+Shift+Space".action = toggle-window-floating;
96
97 "Mod+Left".action = set-column-width "-10%";
98 "Mod+Down".action = set-window-height "-10%";
99 "Mod+Up".action = set-window-height "+10%";
100 "Mod+Right".action = set-column-width "+10%";
101
102 "Mod+Shift+Z" = {
103 action = spawn (lib.getExe niri) "msg" "action" "power-off-monitors";
104 allow-when-locked = true;
105 };
106
107 "XF86MonBrightnessUp" = {
108 action = spawn lightctl "-d" "-e4" "-n1" "up";
109 allow-when-locked = true;
110 };
111 "XF86MonBrightnessDown" = {
112 action = spawn lightctl "-d" "-e4" "-n1" "down";
113 allow-when-locked = true;
114 };
115 "XF86AudioRaiseVolume" = {
116 action = spawn volumectl "-d" "-u" "up";
117 allow-when-locked = true;
118 };
119 "XF86AudioLowerVolume" = {
120 action = spawn volumectl "-d" "-u" "down";
121 allow-when-locked = true;
122 };
123 "XF86AudioMute" = {
124 action = spawn volumectl "-d" "toggle-mute";
125 allow-when-locked = true;
126 };
127 "XF86AudioMicMute" = {
128 action = spawn volumectl "-d" "-m" "toggle-mute";
129 allow-when-locked = true;
130 };
131
132 "Mod+Semicolon".action = spawn dunstctl "close";
133 "Mod+Shift+Semicolon".action = spawn dunstctl "close-all";
134 "Mod+Period".action = spawn dunstctl "context";
135 "Mod+Comma".action = spawn dunstctl "history-pop";
136 };
137 };
138 };
139}