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

qt: adds default value for qt.platform #884

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

Mikilio
Copy link
Contributor

@Mikilio Mikilio commented Feb 19, 2025

extra additions related to d171b19.
Adds a default value so it does not fail like in issue #835

Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

Can you rebase this on top of master? I assume only commit 0d75bef needs to be cherry-picked.

@trueNAHO
Copy link
Collaborator

How does this PR compare to nix-community/home-manager#6493?

@Mikilio
Copy link
Contributor Author

Mikilio commented Feb 23, 2025

How does this PR compare to nix-community/home-manager#6493?

Unrelated I have subscribed to nix-community/home-manager#6493 and will adapt in a new PR that also fixes #869

@Mikilio Mikilio force-pushed the plasma6-warning branch 5 times, most recently from b98d8a7 to 5bd8c8b Compare February 23, 2025 17:40
Adds a default value so the option can be referenced when unset
@Mikilio Mikilio changed the title Plasma6 warning qt: adds default value for qt.platform Feb 23, 2025
@Mikilio Mikilio requested a review from trueNAHO February 23, 2025 17:48
@nixith
Copy link

nixith commented Feb 23, 2025

Defaults are already handled for the qt nixos modules here with extra logic I believe

stylix.targets.qt.platform =
with config.services.xserver.desktopManager;
if gnome.enable && !(plasma5.enable || lxqt.enable) then
"gnome"
else if plasma5.enable && !(gnome.enable || lxqt.enable) then
"kde"
else if lxqt.enable && !(gnome.enable || plasma5.enable) then
"lxqt"
else
"qtct";

Wouldn't it be better to move this block of code up, or otherwise mark this value as lib.mkDefault?

I haven't tested it yet, but as it stands I think this value will collide with what is set in the option if the two differ anyways.

@Mikilio
Copy link
Contributor Author

Mikilio commented Feb 24, 2025

lib.mkDefault is discouraged by @danth. In fact, I used it before like that.
The redundancy is true. The case where we need this is where the NixOS level home-manager integration needs to access this variable as it is shared with the home-manager configuration. This in particular also happens when plasma6 is set and the module is effectively disabled. One thing I could add is to also explicitly disable the home-manager module in this case.

Keep in mind that this only a temporary fix for like 2-3 weeks to ensure backwards compatibility and avoid build errors.
Proper CI/CD is still work in progress afaik.

@trueNAHO trueNAHO enabled auto-merge (squash) February 24, 2025 18:06
Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

LGTM.

lib.mkDefault is discouraged by [danth].

For reference, this is explained in #388.

@trueNAHO trueNAHO merged commit 225b4c5 into danth:master Feb 24, 2025
53 checks passed
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

Successfully merging this pull request may close these issues.

3 participants