From 633ba8fae25c54dfabfcd12c398f62f76e1c92e8 Mon Sep 17 00:00:00 2001 From: Random Dude Date: Sat, 20 Jun 2026 16:28:59 +0530 Subject: [PATCH] modules/swaync: init --- modules/swaync/module.nix | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/swaync/module.nix diff --git a/modules/swaync/module.nix b/modules/swaync/module.nix new file mode 100644 index 0000000..ba40d84 --- /dev/null +++ b/modules/swaync/module.nix @@ -0,0 +1,42 @@ +{ + config, + lib, + wlib, + ... +}: +let + jsonFmt = config.pkgs.formats.json; +in +{ + _class = "wrapper"; + options = { + configOptions = lib.mkOption { + type = jsonFmt.type; + default = { }; + description = '' + SwayNotificationCenter configuration file. + See {manpage}`swaync(5)` + ''; + }; + configFile = lib.mkOption { + type = wlib.types.file config.pkgs; + default.path = jsonFmt.generate "swaync-config" config.configOptions; + }; + "style.css" = lib.mkOption { + type = wlib.types.file config.pkgs; + default.content = ""; + }; + }; + + config.package = config.pkgs.swaynotificationcenter; + + config.flags = { + "--config" = config.configFile.path; + "--style" = config."style.css".path; + }; + + config.meta.maintainers = [ + lib.maintainers.randomdude + ]; + config.meta.platforms = lib.platforms.linux; +}