[PR #953] [MERGED] feat(nix)!: standardize home-manager options & restructure flake #5276

Closed
opened 2026-05-23 00:56:47 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/953
Author: @74k1
Created: 5/1/2025
Status: Merged
Merged: 5/6/2025
Merged by: @JakeStanger

Base: masterHead: update-flake


📝 Commits (4)

  • 5affad3 refactor(nix): use flake-parts and flake-compat
  • 322fc0c feat(nix)!: standardize home-manager module options
  • d97d07e chore(nix): reformat package.nix with alejandra
  • 89073dc feat(nix): use lib.fileset for src

📊 Changes

8 files changed (+465 additions, -352 deletions)

View changed files

📝 README.md (+29 -2)
📝 flake.lock (+50 -0)
📝 flake.nix (+94 -183)
nix/default.nix (+0 -144)
nix/devshell.nix (+25 -0)
nix/module.nix (+88 -0)
nix/package.nix (+166 -0)
📝 shell.nix (+13 -23)

📄 Description

This is a draft PR, since I haven't gotten around restructuring the flake into modules. - Once that's done, I'll edit this message.

For now, 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 (breaking, see below)

BREAKING CHANGE: programs.ironbar.systemd is no longer enabled by default

(opinionated) reasons for this breaking change being:

  • programs should not have a service enabled by default. For those cases, home-manager has service options too.
  • one could seperately add ${lib.getExe pkgs.ironbar} to their own Window Manager (for niri: spawn-at-startup, for hyprland: exec-once) to get ironbar running. - and therefore would just want/need the programs.ironbar option to configure ironbar.

I'm mainly basing this off of waybar's home-manager options.


closes: #950


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/953 **Author:** [@74k1](https://github.com/74k1) **Created:** 5/1/2025 **Status:** ✅ Merged **Merged:** 5/6/2025 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `update-flake` --- ### 📝 Commits (4) - [`5affad3`](https://github.com/JakeStanger/ironbar/commit/5affad340035ecd08bea7f0f7c24e9a9526aee3f) refactor(nix): use `flake-parts` and `flake-compat` - [`322fc0c`](https://github.com/JakeStanger/ironbar/commit/322fc0cdcc029dec46af2411bf1bda4f77689691) feat(nix)!: standardize home-manager module options - [`d97d07e`](https://github.com/JakeStanger/ironbar/commit/d97d07e98e218dc6a046b6ea51f280774af242dd) chore(nix): reformat `package.nix` with `alejandra` - [`89073dc`](https://github.com/JakeStanger/ironbar/commit/89073dc0cfa61a079ecf6a0e723811611a6ed122) feat(nix): use `lib.fileset` for `src` ### 📊 Changes **8 files changed** (+465 additions, -352 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+29 -2) 📝 `flake.lock` (+50 -0) 📝 `flake.nix` (+94 -183) ➖ `nix/default.nix` (+0 -144) ➕ `nix/devshell.nix` (+25 -0) ➕ `nix/module.nix` (+88 -0) ➕ `nix/package.nix` (+166 -0) 📝 `shell.nix` (+13 -23) </details> ### 📄 Description This is a draft PR, since I haven't gotten around restructuring the flake into modules. - Once that's done, I'll edit this message. For now, 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 (**breaking**, see below) --- BREAKING CHANGE: `programs.ironbar.systemd` is no longer enabled by default (opinionated) reasons for this breaking change being: - `programs` should not have a service enabled by default. For those cases, home-manager has `service` options too. - one could seperately add `${lib.getExe pkgs.ironbar}` to their own Window Manager (for niri: `spawn-at-startup`, for hyprland: `exec-once`) to get ironbar running. - and therefore would just want/need the `programs.ironbar` option to configure ironbar. I'm mainly basing this off of `waybar`'s home-manager options. --- closes: #950 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-23 00:56:47 +01:00
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#5276
No description provided.