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