This is backwards compatible and allows for more flexibility(eg.
allows for defining custom waybar modules in separate nixos modules,
before merging them together)
Co-authored-by: mae <git@badat.dev>
- The check did not account the default value of `settings.modules` to be `{}`.
The default value was changed to null.
- The `settings.modules` option is now hidden from the docs.
The `style` option now also accepts a path instead of a text
configuration.
Keeping up with new Waybar options is annoying, so make the module a
freeform module.
The `modules` option will be removed in release 22.05.
The logic to generate warnings for modules and everything was
removed. I don't want to maintain the code that generates these
warnings anymore.
Before, loading a module would be guarded by an optional platform
condition. This made it possible to avoid loading and evaluating a
module if it did not support the host platform.
Unfortunately, this made it impossible to share a single configuration
between GNU/Linux and Darwin hosts, which some wish to do.
This removes the conditional load and instead inserts host platform
assertions in the modules that are platform specific.
Fixes#1906
Set the systemd user service to use "mixed" killmode, which lets waybar
stop its module scripts. This fixes issues where waybar blocks shutdown
until systemd sends a SIGKILL to waybar child processes.
The current definition makes waybar wait for dbus.service, but that
never happens because dbus.service is started on demand by
dbus.socket.
Per systemd docs:
https://www.freedesktop.org/software/systemd/man/systemd.service.html#Implicit%20Dependencies
- Services with Type=dbus set automatically acquire dependencies of
type Requires= and After= on dbus.socket.
- Socket activated services are automatically ordered after their
activating .socket units via an automatic After= dependency.
Services also pull in all .socket units listed in Sockets= via
automatic Wants= and After= dependencies.
Removing Requisite/After makes the service properly start for me,
simply specifying Type=dbus is enough.
See #1370
- Change the `attrsOf unspecified` to `pkgs.formats.json`
- Add missing default modules
- Expand the `with lib` with every function used
- Add inline documentation about the generated warnings