modules/home/desktop/niri/default.nix: refactor

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-04-15 13:09:56 +03:00
parent 7f620d0c54
commit e96d402f1e

View File

@ -5,12 +5,12 @@
lib,
...
}: let
inherit (builtins) removeSuffix;
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
inherit (osConfig.networking) hostId;
inherit (config.lib.stylix) colors;
inherit (config.stylix) cursor theme;
inherit (osConfig.networking) hostId;
cfg = config.desktop.niri;
cursorSize = config.stylix.cursor.size;
cursorName = config.stylix.cursor.name;
keyboard =
if hostId == "eldrid"
then "chromeos"
@ -427,8 +427,8 @@ in {
}
cursor {
xcursor-theme "${cursorName}"
xcursor-size ${toString cursorSize}
xcursor-theme "${cursor.name}"
xcursor-size ${toString cursor.size}
}
layout {
@ -973,7 +973,7 @@ in {
then "Papirus-Dark"
else "Papirus-Light";
package =
if osConfig.module.stylix.theme == "nord"
if (removeSuffix "-light" theme) == "nord"
then pkgs.papirus-nord
else pkgs.papirus-icon-theme;
};
@ -983,6 +983,9 @@ in {
platformTheme.name = "gtk3";
};
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:close";
};
"org/gnome/desktop/interface" = {
icon-theme = config.gtk.iconTheme.name;
};