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
sway: Optimal NixOS integration #57602
Comments
virtboard is packaged in #57614 |
Could actkbd or acpid used instead? For brightness control locally I use
Will this work for all videocards? If so, I would like to add brightness control defaults to actkbd, like we already have for sound control |
Don't see it in nixpkgs.
What benefits it brings? sway is capable to run applications on start by itself. |
Starting sway itself, presumably. |
I do not have any preference here, it was simply meant as a list of software that could be useful (I took if from Drew's blog post). I also didn't plan to integrate this into the
Might be a good idea if we already have this for sound. But since this is a generic solution that should work with both Wayland and X11 we should not put it in the
Only the checked entries (checkbox) are already in nixpkgs.
That's a valid concern. (Edit: Also, please note that this is only a collection of possible improvements (that often require further discussion).) |
Home-manager provided a nice way to set i3 declaratively [0]. [0] https://github.com/rycee/home-manager/blob/master/modules/services/window-managers/i3.nix |
Looks like we have a blocker for user services: #21460
Right, I'm just interesting whether it will work with different video cards. I only have Intel there.
Sorry. With sway 1.0-rc5, firefox and breeze dark theme they are not visible by some reason. |
wf-recorder has been merged! #57662 🎉 |
I also only have Intel but according to the Arch Wiki:
it sounds like a good method that should work in most cases. But we would have to modify the script to consider According to the Arch Wiki:
and on my system
As long as it works with 1.0 :)
@amazari interesting. I don't think that we can/should move it in-tree (too many configuration options IMO) but I'm assuming that adding a module for |
Waybar has been merged. #54627 |
@primeos Would be nice to add environment setup like that https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/display-managers/default.nix does |
What about bemenu? |
@NilsIrl good idea, I added it to the list - it's already packaged in nixpkgs (pkgs/applications/misc/bemenu/default.nix) @gnidorah seems like I forgot to reply :o Regarding the environment setup: Yes, that would be nice. I think there is already an issue to unify this for X11 and Wayland (I'll try to look it up and reference it). Regarding the notification: Can this be reproduced (e.g. with |
@primeos
If I start mako manually, everything works fine |
@gnidorah great :) Just realized that I missed the
Seems like |
How to make it work under sway? This doesn't show anything for me
|
I had the same problem. Bemenu is only in the master branch. git clone git@github.com:NixOS/nixpkgs.git
nix-build -A bemenu -I nixpkgs=nixpkgs/
# OR
nix-build -A bemenu -I nixpkgs/ The part after the |
@NilsIrl I've tried it from master branch, but when I run |
Have you tried to run bemenu from a terminal? |
That is. And nothing on the screen. Sway version is 1.1.1 |
If you can open a terminal, you could see what bemenu outputs when it is run. If you don't have access to a terminal, you can try to redirect the output from bemenu into a file and then view the file. |
I personally had a problem where I couldn't even run a terminal. What I did is that I redirected stdout and stderr from the command launching the terminal in sway into a file. I then viewed the file from the tty. And guess what... The file had an error message saying my version of opengl was too outdated for the terminal emulator, alacritty to work. |
@NilsIrl Looks like my mistake was in that I've tried to run |
@gnidorah |
I have updated my config (also linked above) to use SDDM instead of GDM. Kanshi still doesn't pick up when outputs are changed on the fly, but this is now a workable setup for me, because I can recover from being left with a black screen easily and every time. I also wanted to highlight that when I was using GDM I used the snippet that @wkral posted and that itself was working well for avoiding UPDATE: |
Hello, I have been experimenting with Sway for a while so I would like to share some feedback. I am currently using NixOS 20.09 and GDM as the login manager. Things mostly work, the one thing that I find problematic is the setup of environment variables. More specifically, when enabling Sway with no customization, simply by saying My current way out of this problem is to enable Sway this way:
I also tried using the I would be interested if there are better ways to proceed. For what it's worth, Gnome session on Wayland apparently does read A few other random thoughts while I am at it:
|
AFAIK the compositor isn't responsible for reading any startup files but I'm not aware of any official documentation regarding this. Most Sway users likely start it from a virtual terminal so the login shell will have already taken care of it. For display managers the behaviour likely isn't consistent (IIRC each one tends to do it's own thing). For Nixpkgs we'd need something like https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/display-managers/default.nix for Wayland. I thought there was already a dedicated issue for this but couldn't find one :o
The discussion is in #60434. IIRC this was because it's a fixed dependency of Sway and the solution via
The latter. I guess the main reasons are to make it easy to avoid optional packages by overriding |
Well, let me be the counter-example here :-)
That indeed seems to be the way to proceed. If Sway appears among the possible sessions in a graphical display manager, then it is expected to be started from there and not from a login shell in the console, so the thing that is run as a session should behave accordingly. A simple
So I'll comment in that issue… |
Sway 1.6 changed the default for
See #119445 (comment) for more details. |
is there a recommended way forward with regards to dbus on wayland? requiring every sway user to add a workaround seems like something we should avoid if this can be managed via |
Some updates: @evils: If this is regarding #57602 (comment) / #119445 then it's fixed now by #122605. That only works for new Sway users though. If you've already copied the old With #123034 and #122602 screen-sharing should also be easier to get to work now. We've also updated the documentation of the Sway module a little bit. Btw: Quick heads-up that I'm planning to remove We're also considering to use a wallpaper in the default configuration for the Sway module but it wasn't decided yet whether to use Sway's default wallpaper (#122995) or a NixOS wallpaper (#122992). Feedback is welcome. Edit: Oh, and we now have a NixOS VM test for Sway: #121437 |
Just wanted to mention that sway recently switched to |
this is regarding 123777 |
|
ulysses4ever: please open a new issue.
…On Mon, 25 Oct 2021, 01:18 Artem Pelenitsyn, ***@***.***> wrote:
vlc stopped working for me on unstable recently: it's only able to load
the CLI interface for some reason. Has anyone experienced this? Google
doesn't show up anything for the error I see except something from the past
related to Raspberry Pi... I'm on pure Wayland (XWayland is disabled).
❯ vlc
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[0000000001c67290] main interface error: no suitable interface module
[0000000001b66610] main libvlc error: interface "globalhotkeys,none" initialization failed
[0000000001b66610] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0000000001c67290] skins2 interface error: cannot initialize OSFactory
[0000000001bf5960] main playlist: playlist is empty
[0000000001c67290] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.16 Vetinari
Command Line Interface initialized. Type `help' for help.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#57602 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV7PJ7LB6BB43HKAXIMET3UISH5BANCNFSM4G6DESGQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@Synthetica9 thanks for suggestion! Here it is: #142863. |
Heads-up: The Nix package was just updated to Sway 1.7. Notable (backward incompatible) changes:
Known issues:
The Electron status is tracked in #156352. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/some-lose-ends-for-sway-on-nixos-which-we-should-fix/17728/1 |
Does anyone experience the return of firefox popup issue (literally all firefox extensions are broken since the popups don't render) on latest unstable? It started to happen since the last mass rebuild from staging has landed to unstable. |
@ymatsiuk mine render, never flicker and even have a solid chance of then never going away; willing to send the excess extraneous ones your way =D I'm now on GNOME tho |
Here is more about the Firefox issue: #167785. I think upstream is looking at fixing it as well. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/source-profile-with-gdm-and-sway/24561/1 |
Today I was hit by the problem of sway not sourcing As most environment variables probably get set by nixpkgs/nixos/modules/programs/ssh.nix Lines 348 to 353 in c43f676
vscode would fail to connect via ssh when launched outside a shell ( microsoft/vscode-remote-release#8043 ), as SSH_AUTH_SOCK had not been set.
An ad-hoc solution is the following: programs.sway.extraSessionCommands = ''
source /etc/profile
'' My guessings are that:
And on a side note, should we wrap sway to get this env, or should sway itself exec bash to get this environment? |
That's actually the intended behaviour (but not everyone likes it - IIRC this already came up a couple of times from users of graphical login managers).
It would probably best to simply document this in https://nixos.wiki/wiki/Sway (just be aware that it's community maintained and not an official NixOS documentation). |
Does anybody have working idle inhibit with firefox (e.g. video playback, video call) running in sway? Not working at all here, current workaround is waybar's idle inhibit module. Not sure where to start debugging this. |
I've had good results from https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit |
This is intended as an issue to collect and track possible improvements and feedback in general. Feedback form users is welcome (what is difficult, does not work, could be improved, are packages missing, etc.).
Possible improvements (feel free to propose additions and notify me of updates):
/etc
and fallback to/nix/store
for non NixOS systems (sway: Read the configuration from /etc before /nix/store #60319)/run/current-system/backgrounds/sway
or/run/current-system/wallpapers/sway
would probably work well, but unfortunately only on NixOSservices.xserver.displayManager.extraSessionFilePackages = [sway];
services.xserver.displayManager.session
share/wayland-sessions
/etc/sway/config
is not optimal because the file in the Nix store is read-only (-> the configuration in~/.config/sway/config
will be read-only). We could consider copying the example configuration file to/etc
(instead of symlinking it) and change the permissions.sway-security
extraSessionCommands
by default?QT_QPA_PLATFORM=wayland-egl
is problematic sometimes as the Wayland backend for QT is unfortunately broken from time to time in nixpkgs. Maybe we should add a test.sway-run
orsway-launch
(similar toweston-launch
)?sway --version
)Useful software (for Wayland in general) in nixpkgs:
wshowkeys (WIP: wshowkeys: init at 2020-03-29 #83687)The text was updated successfully, but these errors were encountered: