treewide: move swaync styling out of module

This commit is contained in:
Anthony Rodriguez 2025-01-17 12:10:33 +01:00
parent 2f4a8433c7
commit 6fef9e0a76
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 31 additions and 37 deletions

View file

@ -1,14 +1,15 @@
{
lib,
lib',
osConfig,
...
}: let
inherit (builtins) readFile;
styleCfg = osConfig.local.style;
in {
config = lib.mkIf osConfig.local.modules.hyprland.enable {
services.swaync = {
services.swaync = lib.mkMerge [
{
enable = true;
style = readFile ./style.css;
settings = {
positionX = "right";
positionY = "top";
@ -26,8 +27,15 @@ in {
notification-body-image-height = 100;
notification-body-image-width = 200;
};
};
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
}
(lib.mkIf styleCfg.enable {
style =
lib'.generateGtkColors lib styleCfg.scheme.palette
+ builtins.readFile ./style.css;
})
];
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
};
}

View file

@ -1,14 +0,0 @@
{
config,
lib,
lib',
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
services.swaync.style = lib'.generateGtkColors lib cfg.scheme.palette;
}
];
}