chore: fix typos; build niri less eagerly

This commit is contained in:
Leon Schwarzäugl 2025-11-13 23:40:41 +01:00 committed by Leon Schwarzäugl
parent 31447d9a3f
commit 9252e9c546
6 changed files with 232 additions and 210 deletions

View file

@ -3664,7 +3664,7 @@ This is a slim setup for developing base configuration. I do not track the hardw
}; };
swarselmodules = { swarselmodules = {
servevr.network = lib.mkForce false; server.network = lib.mkForce false;
}; };
swarselsystems = { swarselsystems = {
@ -6794,12 +6794,16 @@ Auto login for the initial session.
xwayland-satellite-unstable xwayland-satellite-unstable
]; ];
niri-flake.cache.enable = true;
programs.niri = { programs.niri = {
enable = true; enable = true;
package = pkgs.niri-unstable; # the actual niri that will be installed and used package = pkgs.niri-unstable; # the actual niri that will be installed and used
}; };
} // {
niri-flake.cache.enable = true;
programs.niri = {
package = null;
};
}; };
} }
#+end_src #+end_src
@ -15353,6 +15357,12 @@ Currently, I am too lazy to explain every option here, but most of it is very se
}; };
}; };
} // {
programs.niri = lib.mkIf (!config.swarselmodules.niri) {
package = null;
config = null;
settings = null;
};
}; };
} }
#+end_src #+end_src
@ -15405,7 +15415,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" ]; exec = [ "${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" ];
outputs = [ outputs = [
{ {
criteria = "eDP-2"; criteria = config.swarselsystems.sharescreen;
status = "enable"; status = "enable";
scale = 1.0; scale = 1.0;
} }
@ -19445,7 +19455,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
lowBattery = lib.mkDefault false; lowBattery = lib.mkDefault false;
network = lib.mkDefault true; network = lib.mkDefault true;
networkDevices = lib.mkDefault true; networkDevices = lib.mkDefault true;
niri = lib.mkDefault true; niri = lib.mkDefault false;
nix-ld = lib.mkDefault true; nix-ld = lib.mkDefault true;
nvd = lib.mkDefault true; nvd = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;
@ -19792,7 +19802,7 @@ This holds modules that are to be used on most hosts. These are also the most im
kitty = lib.mkDefault true; kitty = lib.mkDefault true;
mail = lib.mkDefault true; mail = lib.mkDefault true;
mako = lib.mkDefault true; mako = lib.mkDefault true;
niri = lib.mkDefault true; niri = lib.mkDefault false;
nix-index = lib.mkDefault true; nix-index = lib.mkDefault true;
nixgl = lib.mkDefault true; nixgl = lib.mkDefault true;
nix-your-shell = lib.mkDefault true; nix-your-shell = lib.mkDefault true;

View file

@ -39,7 +39,7 @@
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" ]; exec = [ "${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" ];
outputs = [ outputs = [
{ {
criteria = "eDP-2"; criteria = config.swarselsystems.sharescreen;
status = "enable"; status = "enable";
scale = 1.0; scale = 1.0;
} }

View file

@ -1,206 +1,213 @@
{ config, pkgs, lib, vars, ... }: { config, pkgs, lib, vars, ... }:
{ {
options.swarselmodules.niri = lib.mkEnableOption "niri settings"; options.swarselmodules.niri = lib.mkEnableOption "niri settings";
config = lib.mkIf config.swarselmodules.niri { config = lib.mkIf config.swarselmodules.niri
{
programs.niri = { programs.niri = {
package = pkgs.niri-unstable; # which package to use for niri validation package = pkgs.niri-unstable; # which package to use for niri validation
settings = { settings = {
xwayland-satellite = { xwayland-satellite = {
enable = true; enable = true;
path = "${lib.getExe pkgs.xwayland-satellite-unstable}"; path = "${lib.getExe pkgs.xwayland-satellite-unstable}";
}; };
prefer-no-csd = true; prefer-no-csd = true;
layer-rules = [ layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screencast"; } { matches = [{ namespace = "^notifications$"; }]; block-out-from = "screencast"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; } { matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
]; ];
window-rules = [ window-rules = [
{ {
matches = [{ app-id = ".*"; }]; matches = [{ app-id = ".*"; }];
opacity = 0.95; opacity = 0.95;
default-column-width = { proportion = 0.5; }; default-column-width = { proportion = 0.5; };
shadow = { shadow = {
enable = true;
draw-behind-window = true;
};
geometry-corner-radius = { top-left = 2.0; top-right = 2.0; bottom-left = 2.0; bottom-right = 2.0; };
}
{ matches = [{ app-id = "at.yrlf.wl_mirror"; }]; opacity = 1.0; }
{ matches = [{ app-id = "Gimp"; }]; opacity = 1.0; }
{ matches = [{ app-id = "firefox"; }]; opacity = 0.99; }
{ matches = [{ app-id = "^special.*"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; }
{ matches = [{ app-id = "chromium-browser"; }]; opacity = 0.99; }
{ matches = [{ app-id = "^qalculate-gtk$"; }]; open-floating = true; }
{ matches = [{ app-id = "^blueman$"; }]; open-floating = true; }
{ matches = [{ app-id = "^pavucontrol$"; }]; open-floating = true; }
{ matches = [{ app-id = "^syncthingtray$"; }]; open-floating = true; }
{ matches = [{ app-id = "^Element$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^Element$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^vesktop$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^vesktop$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^com.nextcloud.desktopclient.nextcloud$"; }]; open-floating = true; }
{ matches = [{ title = ".*1Password.*"; }]; excludes = [{ app-id = "^firefox$"; } { app-id = "^emacs$"; } { app-id = "^kitty$"; }]; open-floating = true; block-out-from = "screencast"; }
{ matches = [{ title = "(?:Open|Save) (?:File|Folder|As)"; }]; open-floating = true; }
{ matches = [{ title = "^Add$"; }]; open-floating = true; }
{ matches = [{ title = "^Picture-in-Picture$"; }]; open-floating = true; }
{ matches = [{ title = "Syncthing Tray"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Frame$"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Anchor$"; }]; open-floating = true; }
{ matches = [{ app-id = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
];
environment = {
DISPLAY = ":0";
} // vars.waylandSessionVariables;
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = {
mod-key = "Super";
keyboard = {
xkb = {
layout = "us";
variant = "altgr-intl";
};
};
mouse = {
natural-scroll = false;
};
touchpad = {
enable = true; enable = true;
draw-behind-window = true; tap = true;
}; tap-button-map = "left-right-middle";
geometry-corner-radius = { top-left = 2.0; top-right = 2.0; bottom-left = 2.0; bottom-right = 2.0; }; natural-scroll = true;
} scroll-method = "two-finger";
{ matches = [{ app-id = "at.yrlf.wl_mirror"; }]; opacity = 1.0; } click-method = "clickfinger";
{ matches = [{ app-id = "Gimp"; }]; opacity = 1.0; } disabled-on-external-mouse = true;
{ matches = [{ app-id = "firefox"; }]; opacity = 0.99; } drag = true;
{ matches = [{ app-id = "^special.*"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; } drag-lock = false;
{ matches = [{ app-id = "chromium-browser"; }]; opacity = 0.99; } dwt = true;
{ matches = [{ app-id = "^qalculate-gtk$"; }]; open-floating = true; } dwtp = true;
{ matches = [{ app-id = "^blueman$"; }]; open-floating = true; }
{ matches = [{ app-id = "^pavucontrol$"; }]; open-floating = true; }
{ matches = [{ app-id = "^syncthingtray$"; }]; open-floating = true; }
{ matches = [{ app-id = "^Element$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^Element$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^vesktop$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^vesktop$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^com.nextcloud.desktopclient.nextcloud$"; }]; open-floating = true; }
{ matches = [{ title = ".*1Password.*"; }]; excludes = [{ app-id = "^firefox$"; } { app-id = "^emacs$"; } { app-id = "^kitty$"; }]; open-floating = true; block-out-from = "screencast"; }
{ matches = [{ title = "(?:Open|Save) (?:File|Folder|As)"; }]; open-floating = true; }
{ matches = [{ title = "^Add$"; }]; open-floating = true; }
{ matches = [{ title = "^Picture-in-Picture$"; }]; open-floating = true; }
{ matches = [{ title = "Syncthing Tray"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Frame$"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Anchor$"; }]; open-floating = true; }
{ matches = [{ app-id = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
];
environment = {
DISPLAY = ":0";
} // vars.waylandSessionVariables;
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = {
mod-key = "Super";
keyboard = {
xkb = {
layout = "us";
variant = "altgr-intl";
}; };
}; };
mouse = { cursor = {
natural-scroll = false; hide-after-inactive-ms = 2000;
hide-when-typing = true;
}; };
touchpad = { layout = {
enable = true; background-color = "transparent";
tap = true; border = {
tap-button-map = "left-right-middle"; enable = true;
natural-scroll = true; width = 1;
scroll-method = "two-finger"; };
click-method = "clickfinger"; focus-ring = {
disabled-on-external-mouse = true; enable = false;
drag = true; };
drag-lock = false; gaps = 5;
dwt = true;
dwtp = true;
}; };
}; binds = with config.lib.niri.actions; let
cursor = { sh = spawn "sh" "-c";
hide-after-inactive-ms = 2000; in
hide-when-typing = true; {
};
layout = { # "Mod+Super_L" = spawn "killall -SIGUSR1 .waybar-wrapped";
background-color = "transparent"; "Mod+z".action = spawn "killall -SIGUSR1 .waybar-wrapped";
border = { "Mod+Shift+t".action = toggle-window-rule-opacity;
enable = true; # "Mod+Escape".action = "mode $exit";
width = 1; "Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = toggle-windowed-fullscreen;
"Mod+q".action = close-window;
"Mod+f".action = spawn "firefox";
"Mod+Space".action = spawn "fuzzel";
"Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
"Mod+Shift+Escape".action = spawn "kitty" "-o" "confirm_os_window_close=0" "btm";
"Mod+h".action = sh ''hyprpicker | wl-copy'';
# "Mod+s".action = spawn "grim" "-g" "\"$(slurp)\"" "-t" "png" "-" "|" "wl-copy" "-t" "image/png";
# "Mod+s".action = screenshot { show-pointer = false; };
"Mod+s".action.screenshot = { show-pointer = false; };
# "Mod+Shift+s".action = spawn "slurp" "|" "grim" "-g" "-" "Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')";
# "Mod+Shift+s".action = screenshot-window { write-to-disk = true; };
"Mod+Shift+s".action.screenshot-window = { write-to-disk = true; };
# "Mod+Shift+v".action = spawn "wf-recorder" "-g" "'$(slurp -f %o -or)'" "-f" "~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
"Mod+e".action = sh "emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
"Mod+d".action = spawn "swarselcheck-niri" "-d";
"Mod+w".action = spawn "swarselcheck-niri" "-e";
"Mod+p".action = spawn "pass-fuzzel";
"Mod+o".action = spawn "pass-fuzzel" "--otp";
"Mod+Shift+p".action = spawn "pass-fuzzel" "--type";
"Mod+Shift+o".action = spawn "pass-fuzzel" "--otp" "--type";
"Mod+Left".action = focus-column-or-monitor-left;
"Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload";
# "Mod+Ctrl+Shift+r".action = "exec swarsel-displaypower";
# "Mod+Shift+e".action = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# "Mod+r".action = "mode resize";
# "Mod+Return".action = "exec kitty";
"Mod+Return".action = spawn "swarselzellij";
"XF86AudioRaiseVolume".action = spawn "swayosd-client" "--output-volume" "raise";
"XF86AudioLowerVolume".action = spawn "swayosd-client" "--output-volume" "lower";
"XF86AudioMute".action = spawn "swayosd-client" "--output-volume" "mute-toggle";
"XF86MonBrightnessUp".action = spawn "swayosd-client" "--brightness raise";
"XF86MonBrightnessDown".action = spawn "swayosd-client" "--brightness lower";
"XF86Display".action = spawn "wl-mirror" "eDP-1";
"Mod+Escape".action = spawn "wlogout";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Minus".action = set-column-width "-10%";
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 0;
"Mod+Shift+1".action = move-column-to-index 1;
"Mod+Shift+2".action = move-column-to-index 2;
"Mod+Shift+3".action = move-column-to-index 3;
"Mod+Shift+4".action = move-column-to-index 4;
"Mod+Shift+5".action = move-column-to-index 5;
"Mod+Shift+6".action = move-column-to-index 6;
"Mod+Shift+7".action = move-column-to-index 7;
"Mod+Shift+8".action = move-column-to-index 8;
"Mod+Shift+9".action = move-column-to-index 9;
"Mod+Shift+0".action = move-column-to-index 0;
}; };
focus-ring = { spawn-at-startup = [
enable = false; # { command = [ "vesktop" "--start-minimized" "--enable-speech-dispatcher" "--ozone-platform-hint=auto" "--enable-features=WaylandWindowDecorations" "--enable-wayland-ime" ]; }
}; # { command = [ "element-desktop" "--hidden" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--disable-gpu-driver-bug-workarounds" ]; }
gaps = 5; # { command = [ "anki" ]; }
}; # { command = [ "obsidian" ]; }
binds = with config.lib.niri.actions; let # { command = [ "nm-applet" ]; }
sh = spawn "sh" "-c"; { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
in ];
{ workspaces = {
# "01-Main" = {
# "Mod+Super_L" = spawn "killall -SIGUSR1 .waybar-wrapped"; # name = "Scratchpad";
"Mod+z".action = spawn "killall -SIGUSR1 .waybar-wrapped"; # };
"Mod+Shift+t".action = toggle-window-rule-opacity; "99-Scratchpad" = {
# "Mod+Escape".action = "mode $exit"; name = "";
"Mod+m".action = focus-workspace-previous; };
"Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = toggle-windowed-fullscreen;
"Mod+q".action = close-window;
"Mod+f".action = spawn "firefox";
"Mod+Space".action = spawn "fuzzel";
"Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
"Mod+Shift+Escape".action = spawn "kitty" "-o" "confirm_os_window_close=0" "btm";
"Mod+h".action = sh ''hyprpicker | wl-copy'';
# "Mod+s".action = spawn "grim" "-g" "\"$(slurp)\"" "-t" "png" "-" "|" "wl-copy" "-t" "image/png";
# "Mod+s".action = screenshot { show-pointer = false; };
"Mod+s".action.screenshot = { show-pointer = false; };
# "Mod+Shift+s".action = spawn "slurp" "|" "grim" "-g" "-" "Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')";
# "Mod+Shift+s".action = screenshot-window { write-to-disk = true; };
"Mod+Shift+s".action.screenshot-window = { write-to-disk = true; };
# "Mod+Shift+v".action = spawn "wf-recorder" "-g" "'$(slurp -f %o -or)'" "-f" "~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
"Mod+e".action = sh "emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
"Mod+d".action = spawn "swarselcheck-niri" "-d";
"Mod+w".action = spawn "swarselcheck-niri" "-e";
"Mod+p".action = spawn "pass-fuzzel";
"Mod+o".action = spawn "pass-fuzzel" "--otp";
"Mod+Shift+p".action = spawn "pass-fuzzel" "--type";
"Mod+Shift+o".action = spawn "pass-fuzzel" "--otp" "--type";
"Mod+Left".action = focus-column-or-monitor-left;
"Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload";
# "Mod+Ctrl+Shift+r".action = "exec swarsel-displaypower";
# "Mod+Shift+e".action = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# "Mod+r".action = "mode resize";
# "Mod+Return".action = "exec kitty";
"Mod+Return".action = spawn "swarselzellij";
"XF86AudioRaiseVolume".action = spawn "swayosd-client" "--output-volume" "raise";
"XF86AudioLowerVolume".action = spawn "swayosd-client" "--output-volume" "lower";
"XF86AudioMute".action = spawn "swayosd-client" "--output-volume" "mute-toggle";
"XF86MonBrightnessUp".action = spawn "swayosd-client" "--brightness raise";
"XF86MonBrightnessDown".action = spawn "swayosd-client" "--brightness lower";
"XF86Display".action = spawn "wl-mirror" "eDP-1";
"Mod+Escape".action = spawn "wlogout";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Minus".action = set-column-width "-10%";
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 0;
"Mod+Shift+1".action = move-column-to-index 1;
"Mod+Shift+2".action = move-column-to-index 2;
"Mod+Shift+3".action = move-column-to-index 3;
"Mod+Shift+4".action = move-column-to-index 4;
"Mod+Shift+5".action = move-column-to-index 5;
"Mod+Shift+6".action = move-column-to-index 6;
"Mod+Shift+7".action = move-column-to-index 7;
"Mod+Shift+8".action = move-column-to-index 8;
"Mod+Shift+9".action = move-column-to-index 9;
"Mod+Shift+0".action = move-column-to-index 0;
};
spawn-at-startup = [
# { command = [ "vesktop" "--start-minimized" "--enable-speech-dispatcher" "--ozone-platform-hint=auto" "--enable-features=WaylandWindowDecorations" "--enable-wayland-ime" ]; }
# { command = [ "element-desktop" "--hidden" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--disable-gpu-driver-bug-workarounds" ]; }
# { command = [ "anki" ]; }
# { command = [ "obsidian" ]; }
# { command = [ "nm-applet" ]; }
{ command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
];
workspaces = {
# "01-Main" = {
# name = "Scratchpad";
# };
"99-Scratchpad" = {
name = "";
}; };
}; };
}; };
};
} // {
programs.niri = lib.mkIf (!config.swarselmodules.niri) {
package = null;
config = null;
settings = null;
};
}; };
} }

View file

@ -4,22 +4,27 @@ let
in in
{ {
options.swarselmodules.${moduleName} = lib.mkEnableOption "${moduleName} settings"; options.swarselmodules.${moduleName} = lib.mkEnableOption "${moduleName} settings";
config = lib.mkIf config.swarselmodules.${moduleName} { config = lib.mkIf config.swarselmodules.${moduleName}
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wl-clipboard wl-clipboard
wayland-utils wayland-utils
libsecret libsecret
cage cage
gamescope gamescope
xwayland-satellite-unstable xwayland-satellite-unstable
]; ];
programs.niri = {
enable = true;
package = pkgs.niri-unstable; # the actual niri that will be installed and used
};
} // {
niri-flake.cache.enable = true; niri-flake.cache.enable = true;
programs.niri = { programs.niri = {
enable = true; package = null;
package = pkgs.niri-unstable; # the actual niri that will be installed and used
}; };
}; };
} }

View file

@ -29,7 +29,7 @@
kitty = lib.mkDefault true; kitty = lib.mkDefault true;
mail = lib.mkDefault true; mail = lib.mkDefault true;
mako = lib.mkDefault true; mako = lib.mkDefault true;
niri = lib.mkDefault true; niri = lib.mkDefault false;
nix-index = lib.mkDefault true; nix-index = lib.mkDefault true;
nixgl = lib.mkDefault true; nixgl = lib.mkDefault true;
nix-your-shell = lib.mkDefault true; nix-your-shell = lib.mkDefault true;

View file

@ -26,7 +26,7 @@
lowBattery = lib.mkDefault false; lowBattery = lib.mkDefault false;
network = lib.mkDefault true; network = lib.mkDefault true;
networkDevices = lib.mkDefault true; networkDevices = lib.mkDefault true;
niri = lib.mkDefault true; niri = lib.mkDefault false;
nix-ld = lib.mkDefault true; nix-ld = lib.mkDefault true;
nvd = lib.mkDefault true; nvd = lib.mkDefault true;
packages = lib.mkDefault true; packages = lib.mkDefault true;