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

add config.services.xserver.windowManager.sway #19663

Closed
wants to merge 2 commits into from
Closed

Conversation

tg-x
Copy link
Member

@tg-x tg-x commented Oct 18, 2016

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@tg-x, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nbp, @AndersonTorres and @edolstra to be potential reviewers.

@tg-x tg-x mentioned this pull request Oct 18, 2016
13 tasks
@tg-x
Copy link
Member Author

tg-x commented Oct 18, 2016

needs wayland-compatible display manager such as SDDM or GDM (tested with SDDM)

@Ericson2314
Copy link
Member

Is this x+wayland? Either way its good progress!

@tg-x
Copy link
Member Author

tg-x commented Oct 18, 2016

yes, the display manager still runs on X, this just adds the option to select sway, that would run in a wayland session

@groxxda
Copy link
Contributor

groxxda commented Oct 18, 2016

Thanks for the work. Obviously this should not be part of services.xserver, but fixing this is a whole other issue. So it's probably ok for now.

Another thing:
At least GDM decides which session (x or wayland) is needed by looking at the path of the .desktop file. If I remember correctly, support for GDM-Session-Type (or similar) was dropped again.

I would really appreciate it, if you tested this with gdm 3.22 from #19081 which itself uses wayland instead of X and see if it works. I might give it a shot myself when I find time.


{
options.services.xserver.windowManager = {
sway = swayOption "sway";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why using a function to generate the options?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is based on i3.nix, sure it does not need the function or mkMerge anymore, could be simplified..

Copy link
Contributor

Choose a reason for hiding this comment

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

Please do so, that will improve the readability and maintainability of the module.
For the record, i3 module was simplified in #20385.

};

config = mkMerge [
(mkIf wmCfg.sway.enable (swayConfig "sway" pkgs.sway wmCfg.sway))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why using a mkMerge and a function to generate the config?

@vikstrous
Copy link
Contributor

I tested this out. I was using slim. Sway started and it even loaded my i3 config and ran i3status without me creating a separate sway config. However, whenever I tried to create a terminal, the process started but it was not visible on the screen. Looking at the process tree in htop I could see all of my terminals and they were all under pid 1. Everything looked normal, I just couldn't see them.

@matthiasbeyer
Copy link
Contributor

This is awesome progress!

Note that in #21808 sway will be updated, which might result in unexpected things after the merge.

I would vote for an options.services.graphics.xserver option, keeping options.services.xserver to be backwards compatible.
But sure, this is another issue and should be discussed elsewhere.

@Mic92 Mic92 mentioned this pull request Feb 21, 2017
2 tasks
@Mic92
Copy link
Member

Mic92 commented Feb 21, 2017

Can you add a setcap wrapper as described in the README.md using our new setcap wrapper module?

@bobvanderlinden
Copy link
Member

Is this PR still relevant?

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

Relevant yes, up-to-date no.

@colemickens
Copy link
Member

This can be closed. It's not longer relevant or up-to-date.

@matthew-piziak
Copy link
Contributor

@colemickens So Sway will not be supported in NixOS?

@colemickens
Copy link
Member

@matthew-piziak oh no, I'm sorry I didn't explain more. There is already a Sway package and module in nixpkgs now!

@bobvanderlinden
Copy link
Member

@matthew-piziak
Copy link
Contributor

Weird, if I add programs.sway.enable = true; to my configuration.nix and also put "sway" in my extraGroups, then running sway gives me Couldn't exec sway-setcap: Permission denied.

Getting a permission error is weird, given that I'm part of the group.

If I run sway as root, I get 03/19/19 13:42:51 - [main.c:48] [wlc] Failed to add socket to wayland display.

@colemickens
Copy link
Member

You're not up to date if you're getting errors about setcap and wlc.

See this commit: NixOS/nixpkgs-channels@45004c6 It's in nixos-unstable and I know the change was ported into the 19.03 channel as well.

@matthew-piziak
Copy link
Contributor

Ah, thanks. Unfortunately NVIDIA drivers do not build on 19.03, and sway does not build on 18.09. NVIDIA is more important to me. I haven't figured out how to import program configuration from specific channels (like sway from unstable, for example). I only know how to do it for packages, not programs. I don't suppose you know how to do that?

@colemickens
Copy link
Member

  1. Sway 1.0 explicitly will refuse to start with nvidia drivers, anyway. You'd need to use nouvaeu.
  2. The NUR supposedly has examples of importing modules but I've never gotten it to work. I actually wanted to do this as part of nixpkgs-wayland.

@matthew-piziak
Copy link
Contributor

Oh, and there's no way to use one set of drivers for sway and one for everything else right? Probably a silly question but I really don't know. Prooobably not going to give up the graphics card performance in exchange for this window manager.

Thanks for answering my questions!

@bobvanderlinden
Copy link
Member

bobvanderlinden commented Apr 13, 2019

Which features are in this PR that aren't on master? If there aren't any, please close this PR. (making an attempt to clean up older PRs)

@moaxcp
Copy link
Contributor

moaxcp commented Oct 4, 2019

Which features are in this PR that aren't on master? If there aren't any, please close this PR. (making an attempt to clean up older PRs)

I don't see any of these features in master.

@colemickens
Copy link
Member

Aren't they on master under programs.sway ? https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/sway.nix

@moaxcp
Copy link
Contributor

moaxcp commented Oct 5, 2019

Aren't they on master under programs.sway ? https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/sway.nix

Yes they are! It makes sense to close then.

@joachifm joachifm closed this Oct 12, 2019
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.

None yet