flocon/home/services/swaync/default.nix
Anthony Rodriguez 2ac966be49
treewide: global refactor towards a better module structure
Initially, I was using a weird combination of options in order to apply
my theme dynamically. I was setting a read-only option from inside my
modules, which was then used in every application that required it. What
I ended up doing is refactoring everything in order to be inside of my
theme module, and automatically configured when enabled, without doing
any mkMerge/mkIf shenanigans in my other pieces of configuration. This
is healthier, although it should be split up as the theme/default.nix
got quite big.
2024-11-26 18:01:46 +01:00

33 lines
906 B
Nix

{
osConfig,
lib,
lib',
...
}: let
inherit (lib) optionalString;
inherit (builtins) readFile;
in {
services.swaync = {
enable = true;
style = readFile ./style.css;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
};
};
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
}