treewide: move hyprland styling out of module

This commit is contained in:
Anthony Rodriguez 2025-01-17 11:55:05 +01:00
parent eb25ce0c43
commit e09569b921
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
4 changed files with 106 additions and 113 deletions

View file

@ -4,7 +4,10 @@
pkgs, pkgs,
osConfig, osConfig,
... ...
}: { }: let
inherit (builtins) toString;
styleCfg = osConfig.local.style;
in {
imports = [./binds.nix]; imports = [./binds.nix];
config = lib.mkIf osConfig.local.modules.hyprland.enable { config = lib.mkIf osConfig.local.modules.hyprland.enable {
@ -35,7 +38,8 @@
systemd.enable = false; systemd.enable = false;
settings = { settings = lib.mkMerge [
{
xwayland = { xwayland = {
force_zero_scaling = true; force_zero_scaling = true;
}; };
@ -113,7 +117,24 @@
disable_hyprland_logo = true; disable_hyprland_logo = true;
middle_click_paste = false; middle_click_paste = false;
}; };
}
(lib.mkIf styleCfg.enable {
env = [
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
];
general = {
border_size = 4;
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
}; };
decoration = {
rounding = 10;
blur.enabled = true;
};
})
];
}; };
}; };
} }

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./gammastep.nix ./gammastep.nix
./gtk.nix
./syncthing.nix ./syncthing.nix
./swaync ./swaync
./udiskie.nix ./udiskie.nix

View file

@ -1,20 +1,19 @@
{ {
lib, lib,
config, osConfig,
... ...
}: let }: let
cfg = config.local.style; styleCfg = osConfig.local.style;
inherit (cfg) scheme;
in { in {
home-manager.sharedModules = lib.mkIf cfg.enable [ config = with styleCfg;
{ lib.mkIf styleCfg.enable {
gtk = rec { gtk = rec {
enable = true; enable = true;
iconTheme = { iconTheme = {
inherit (cfg.gtk.iconTheme) name package; inherit (gtk.iconTheme) name package;
}; };
theme = { theme = {
inherit (cfg.gtk.theme) name package; inherit (gtk.theme) name package;
}; };
gtk3.extraConfig = { gtk3.extraConfig = {
@ -24,6 +23,5 @@ in {
}; };
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}"; dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
} };
];
} }

View file

@ -1,27 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
wayland.windowManager.hyprland.settings = {
env = [
"HYPRCURSOR_THEME,phinger-cursors-light"
"HYPRCURSOR_SIZE,32"
"XCURSOR_SIZE,32"
];
general = {
border_size = 4;
"col.active_border" = "rgb(${lib.removePrefix "#" cfg.scheme.palette.base0E})";
};
decoration = {
rounding = 10;
blur.enabled = true;
};
};
}
];
}