Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wofi] Unable to add css style #891

Open
freerig opened this issue Feb 22, 2025 · 9 comments
Open

[Wofi] Unable to add css style #891

freerig opened this issue Feb 22, 2025 · 9 comments

Comments

@freerig
Copy link

freerig commented Feb 22, 2025

Hi,
Nix says 'programs.wofi.style' has conflicting definition values because I set my own css. I tried lib.mkAfter and lib.mkBefore but still got the same problem. I don't want to override Stylix's css.
Is the problem Stylix or me ?

@awwpotato
Copy link
Contributor

I can't reproduce this, could you share your config? This is really weird cause strings should be merged not conflict.

@freerig
Copy link
Author

freerig commented Feb 22, 2025

The option `home-manager.users.me.programs.wofi.style' has conflicting definition values:
       - In `/nix/store/7l4my11qkba03pwi9sgvr6b82cyb8vrw-source/modules/wofi/hm.nix':
           ''
             window {
               font-family: "JetBrainsMono Nerd Font";
               font-size: 10pt;

           ...
       - In `/nix/store/kdynjy1mbgkdg4p196v9gx6ljpf7q4nk-source/flake.nix':
           ''
             * {
                    border-radius: 0;
             }
           ''
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.

In my home.nix :

programs.waybar = {
	enable = true;
        # some settings options, nothing too scary...
	style = /* css */ ''
* {
	border-radius: 0;
	box-shadow: none;
}
/* other css... */
	'';
};



programs.wofi = {
	enable = true;
	style = /* css */ ''
* {
	border-radius: 0;
}
'';
};

However, the waybar style gets merged correcly (and firefox...). Wofi is the only one.

I'll maybe put my edited config in a gh repo when I have time (the current one is old)

@freerig
Copy link
Author

freerig commented Feb 23, 2025

Btw I have configured stylist only on the NixOS side, not home manager. But it used to work.

@trueNAHO
Copy link
Collaborator

Is this issue a duplicate of #481?

@awwpotato
Copy link
Contributor

Is this issue a duplicate of 481?

Nope, the expected behavior is for redefining wofi.style to merge the definitions.

@awwpotato
Copy link
Contributor

@freerig it's hard to offer much support without your full config.

Btw I have configured stylist only on the NixOS side, not home manager.

clearly stylix is important as a hm module, cause programs.wofi.style is an option that only exists in home manager.

@trueNAHO
Copy link
Collaborator

Is this issue a duplicate of 481?

Nope, the expected behavior is for redefining wofi.style to merge the definitions.

I think this is vaguely what the previously mentioned issue is about.

Either way, extending Stylix options is currently not always possible because we are generating our own configuration files, instead of integrating with the Nix options of other frameworks, like Home Manager or NixOS. Note that resolving this is part of the roadmap.

@awwpotato
Copy link
Contributor

Either way, extending Stylix options is currently not always possible because we are generating our own configuration files, instead of integrating with the Nix options of other frameworks, like Home Manager or NixOS. Note that resolving this is part of the roadmap.

Works fine on waybar, and should also work for wofi. Nix should merge the stylix config with the user's config.

@freerig
Copy link
Author

freerig commented Feb 24, 2025

Ok see my config at https://codeberg.org/nyxer/computer-machine
I use a custom NixOS / HM strange blended thing, maybe you'll not understand everything...
(and yep, I don't have the same pseudo on github and codeberg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants