Skip to content

Nix/module: add defaultSettings #9939

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fufexan
Copy link
Member

@fufexan fufexan commented Apr 6, 2025

Describe your PR, what does it fix/add?

TO BE MERGED AFTER #9930

Add defaultSettings option in the NixOS module. Can be disabled by setting it to {}.

Default settings currently includes allowing screencopy for XDPH and grim, and optionally adding exec-once = uwsm finalize in case withUWSM = true.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Brainstorming is welcome. This is what made sense to me at the time of opening this PR.

Is it ready for merging, or does it need work?

Untested, no.

@fxzzi
Copy link
Contributor

fxzzi commented Apr 6, 2025

Are you sure we need uwsm finalize? According to the uwsm docs it states:

TLDR; if your compositor puts WAYLAND_DISPLAY (and along with it DISPLAY, or other important or useful variables) into systemd activation environment, uwsm will make everything work automagically, proceed to section 3.

Otherwise configure compositor to run uwsm finalize command at the end of its startup. It will deal with putting WAYLAND_DISPLAY and DISPLAY (if set) variables into activation environments in the best possible ways and signal unit readiness to systemd.

I am assuming hyprland does set these as uwsm wants and therefore the manual finalize shouldn't be needed

I am assuming this since I don't use this finalize command and I haven't faced any issues regarding unset WAYLAND_DISPLAY or DISPLAY, let me know if I'm incorrect here though.

@fufexan
Copy link
Member Author

fufexan commented Apr 7, 2025

It may be a remnant from the early days of uwsm support, as it was needed sometimes to properly finish setting up the session.

If it's no longer needed, I'll remove it.

@fufexan
Copy link
Member Author

fufexan commented Apr 7, 2025

Another possible approach would be to have a toggle enableDefaultConfig explaining what settings are being added, since it's something you either want or don't want.

But I believe this would hurt visibility, as having the option an attrset directly shows its value as default.

@fufexan fufexan force-pushed the nix-permission-mgr branch from b97b837 to 5da63e9 Compare April 8, 2025 17:51
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.

2 participants