[GH-ISSUE #950] [Feature Request] NixOS home-manager module - automatically reload ironbar, once config changes #3099

Closed
opened 2026-05-22 23:54:02 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @74k1 on GitHub (Apr 29, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/950

Is your feature request related to a problem? Please describe.
The current Nix home-manager Module doesn't allow ironbar to reload, once the configuration has changed.
The Ironbar CSS file from the home-manager Module also doesn't get loaded at all initially.

This requires the user, even if programs.ironbar.systemd = enable; is set, to have to manually restart ironbar with ironbar restart and load the css once / at start with ironbar load-css ~/.config/ironbar/ironbar.css.

Describe the solution you'd like
I've already implemented a solution to this problem here https://github.com/74k1/ironbar/tree/update-flake. As per CONTRIBUTING.md I'd first like to check if @JakeStanger is open for a PR that would solve this minor issue. :)

My changes include:

  • set onChange (simple ironbar reload command) for xdg.ConfigFile."ironbar/config.json"
  • use lib.mkEnableOptions for systemd option as well to make it disabled by default
  • slight modifications to the systemd options
    • add Documentation URL
    • use config.wayland.systemd.target instead of "graphical-session.target" to PartOf and Install.WantedBy
    • add "tray.target" to PartOf and Install.WantedBy
    • add ExecReload command
    • add optional ExecPost if cfg.style != "" for loading css on service start
    • matched the format more to waybar's home-manager systemd options

Describe alternatives you've considered
We could consider submitting this to home-manager upstream later, once we've refined the module further.

Additional context
After initial approval, I'd start updating the documentation for nix as per contributing guidelines.
And additionally, if it's okay, I'd like to reorganize the Nix flake structure to improve modularity and visibility, rather than keeping everything in flake.nix and nix/default.nix.

Thanks!

Originally created by @74k1 on GitHub (Apr 29, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/950 **Is your feature request related to a problem? Please describe.** The current Nix home-manager Module doesn't allow ironbar to reload, once the configuration has changed. The Ironbar CSS file from the home-manager Module also doesn't get loaded at all initially. This requires the user, even if `programs.ironbar.systemd = enable;` is set, to have to manually restart ironbar with `ironbar restart` and load the css once / at start with `ironbar load-css ~/.config/ironbar/ironbar.css`. **Describe the solution you'd like** I've already implemented a solution to this problem here https://github.com/74k1/ironbar/tree/update-flake. As per [CONTRIBUTING.md](https://github.com/JakeStanger/ironbar/blob/master/CONTRIBUTING.md) I'd first like to check if @JakeStanger is open for a PR that would solve this minor issue. :) My changes include: - set `onChange` (simple `ironbar reload` command) for `xdg.ConfigFile."ironbar/config.json"` - use lib.mkEnableOptions for systemd option as well to make it disabled by default - slight modifications to the systemd options - add Documentation URL - use `config.wayland.systemd.target` instead of `"graphical-session.target"` to `PartOf` and `Install.WantedBy` - add "tray.target" to `PartOf` and `Install.WantedBy` - add `ExecReload` command - add optional `ExecPost` if `cfg.style != ""` for loading css on service start - matched the format more to waybar's home-manager systemd options **Describe alternatives you've considered** We could consider submitting this to [home-manager](https://github.com/nix-community/home-manager) upstream later, once we've refined the module further. **Additional context** After initial approval, I'd start updating the documentation for nix as per contributing guidelines. And additionally, if it's okay, I'd like to reorganize the Nix flake structure to improve modularity and visibility, rather than keeping everything in flake.nix and nix/default.nix. Thanks!
Author
Owner

@JakeStanger commented on GitHub (Apr 29, 2025):

Yes this all sounds good to me, thanks for checking :)

The nix code does need some love but it's outside of my wheelhouse a bit so glad it's getting the attention it deserves. Happy to take on PRs for everything mentioned.

<!-- gh-comment-id:2840378560 --> @JakeStanger commented on GitHub (Apr 29, 2025): Yes this all sounds good to me, thanks for checking :) The nix code does need some love but it's outside of my wheelhouse a bit so glad it's getting the attention it deserves. Happy to take on PRs for everything mentioned.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#3099
No description provided.