Skip to content

rofi: use mkTarget#1550

Merged
danth merged 1 commit intonix-community:masterfrom
0xda157:rofi-mkTarget
Jun 28, 2025
Merged

rofi: use mkTarget#1550
danth merged 1 commit intonix-community:masterfrom
0xda157:rofi-mkTarget

Conversation

@0xda157
Copy link
Copy Markdown
Contributor

@0xda157 0xda157 commented Jun 26, 2025

Things done

Notify maintainers

@stylix-automation stylix-automation bot added the topic: home-manager Home Manager target label Jun 26, 2025
Copy link
Copy Markdown
Member

@danth danth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danth danth merged commit 713f8da into nix-community:master Jun 28, 2025
7 checks passed
@servaasvdc
Copy link
Copy Markdown

servaasvdc commented Jun 28, 2025

In fonts.size.popups, should it be sizes instead of size?

I'm a super new Nix user so I'm hesitant, but I'm getting errors when integrating rofi and stylix:

       error: attribute 'size' missing
       at /nix/store/qwgmn4jsy1m17rgjpfiqlqc1chqqvmar-source/modules/rofi/hm.nix:15:66:
           14|       {
           15|         programs.rofi.font = "${fonts.monospace.name} ${toString fonts.size.popups}";
             |                                                                  ^
           16|       }

And based on the stylix docs for nixos I have the impression it should be sizes.

@VuiMuich
Copy link
Copy Markdown
Contributor

VuiMuich commented Jun 28, 2025

In fonts.size.popups, should it be sizes instead of size?

I'm a super new Nix user so I'm hesitant, but I'm getting errors when integrating rofi and stylix:

       error: attribute 'size' missing
       at /nix/store/qwgmn4jsy1m17rgjpfiqlqc1chqqvmar-source/modules/rofi/hm.nix:15:66:
           14|       {
           15|         programs.rofi.font = "${fonts.monospace.name} ${toString fonts.size.popups}";
             |                                                                  ^
           16|       }

And based on the stylix docs for nixos I have the impression it should be sizes.

I am seeing the same error and as I am using lix it also suggests to use sizes:

┏━ 1 Errors:
┃ error:
┃        … while evaluating an expression to select 'drvPath' on it
┃          at «internal»:1:552:
┃        … while evaluating strict
┃          at «internal»:1:552:
┃        (stack trace truncated; use '--show-trace' to show the full trace)
┃
┃        error: attribute 'size' missing
┃        at /nix/store/qwgmn4jsy1m17rgjpfiqlqc1chqqvmar-source/modules/rofi/hm.nix:15:72:
┃            14|       {
┃            15|         programs.rofi.font = "${fonts.monospace.name} ${toString fonts.size.popups}";|                                                                        ^
┃            16|       }
┃        Did you mean sizes?
┣━━━
┗━ ∑ ⚠ Exited with 1 errors reported by nix at 17:03:43 after 28s

I use this little overlay right now, which builds the derivation, but somehow now rofi theme is created by stylix:
I tried to fix this with this patch overlay, but somehow it does not apply the patch (the previous success was a false positive as I had set stylix.targets.rofi.enable = false 🤦‍♂️):

fixups = final: prev: {
     stylix = prev.stylix.overrideAttrs (oldAttrs: {
        patches = (oldAttrs.patches or []) ++ [
          (final.writeText "stylix-rofi-font-fix.patch" ''
            diff --git a/modules/rofi/hm.nix b/modules/rofi/hm.nix
            index abcdef0..1234567 100644
            --- a/modules/rofi/hm.nix
            +++ b/modules/rofi/hm.nix
            @@ -15,7 +15,7 @@
             {
               programs.rofi.font =
            -    "\$\{fonts.monospace.name\} \$\{toString fonts.size.popups\}";
            +    "\$\{fonts.monospace.name\} \$\{toString fonts.sizes.popups\}";
             }
          '')
        ];
      });
};

@VuiMuich VuiMuich mentioned this pull request Jun 28, 2025
5 tasks
VuiMuich added a commit to VuiMuich/stylix that referenced this pull request Jun 28, 2025
nix-community#1550 breaks build with "error: attribute 'size' is missing" so we use
`fonts.sizes` instead
@JulianFP JulianFP mentioned this pull request Jun 28, 2025
2 tasks
trueNAHO pushed a commit that referenced this pull request Jun 28, 2025
Closes: #1555
Fixes: 713f8da ("rofi: use mkTarget (#1550)")
Link: #1553
Link: #1554

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
stylix-automation bot pushed a commit that referenced this pull request Jun 28, 2025
(cherry picked from commit 713f8da)
@stylix-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.05:

trueNAHO pushed a commit to trueNAHO/stylix that referenced this pull request Jun 28, 2025
trueNAHO pushed a commit to trueNAHO/stylix that referenced this pull request Jun 28, 2025
Closes: nix-community#1555
Fixes: 713f8da ("rofi: use mkTarget (nix-community#1550)")
Link: nix-community#1553
Link: nix-community#1554

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit 3a09d3f)
@0xda157 0xda157 deleted the rofi-mkTarget branch June 28, 2025 21:35
0xda157 added a commit that referenced this pull request Jun 28, 2025
(cherry picked from commit 713f8da)
0xda157 pushed a commit that referenced this pull request Jun 28, 2025
Closes: #1555
Fixes: 713f8da ("rofi: use mkTarget (#1550)")
Link: #1553
Link: #1554

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit 3a09d3f)
0xda157 added a commit that referenced this pull request Jul 4, 2025
Fixes: dea0337 ("stylix: restrict access to config while using mkTarget (#1368)")
Fixes: 713f8da ("rofi: use mkTarget (#1550)")
stylix-automation bot pushed a commit that referenced this pull request Jul 4, 2025
Fixes: dea0337 ("stylix: restrict access to config while using mkTarget (#1368)")
Fixes: 713f8da ("rofi: use mkTarget (#1550)")
(cherry picked from commit 606944b)
0xda157 added a commit that referenced this pull request Jul 4, 2025
Fixes: dea0337 ("stylix: restrict access to config while using mkTarget (#1368)")
Fixes: 713f8da ("rofi: use mkTarget (#1550)")
(cherry picked from commit 606944b)
LunaCOLON3 pushed a commit to LunaCOLON3/stylix that referenced this pull request Jul 14, 2025
LunaCOLON3 pushed a commit to LunaCOLON3/stylix that referenced this pull request Jul 14, 2025
Closes: nix-community#1555
Fixes: 713f8da ("rofi: use mkTarget (nix-community#1550)")
Link: nix-community#1553
Link: nix-community#1554

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
LunaCOLON3 pushed a commit to LunaCOLON3/stylix that referenced this pull request Jul 14, 2025
Fixes: dea0337 ("stylix: restrict access to config while using mkTarget (nix-community#1368)")
Fixes: 713f8da ("rofi: use mkTarget (nix-community#1550)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: home-manager Home Manager target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants