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: 0.13.0 -> 0.14.0 #30493
sway: 0.13.0 -> 0.14.0 #30493
Conversation
How can I test this? |
It doesn't seem to work if all you do is |
Just in case re: installation method: did you try adding `result/bin`
to `$PATH` without system-wide installation?
|
I added a module with the capabilities as described in the project page, but I get a segfault as well: gdb> bt
#0 0x00007f4798edf0f7 in wl_list_remove () from /nix/store/xyajc0iyp9z1pkmssfazjjsvw1r9kc68-wayland-1.12.0/lib/libwayland-server.so.0
#1 0x00007f47997ce3a7 in wlc_xwm_release () from /nix/store/ia6jgf3yw2nrz0704dbnnk09bcrx6rsj-wlc-0.0.10/lib/libwlc.so.0
#2 0x00007f47997b34c0 in xwayland_event () from /nix/store/ia6jgf3yw2nrz0704dbnnk09bcrx6rsj-wlc-0.0.10/lib/libwlc.so.0
#3 0x00007f47997cbafc in wlc_xwayland_terminate () from /nix/store/ia6jgf3yw2nrz0704dbnnk09bcrx6rsj-wlc-0.0.10/lib/libwlc.so.0
#4 0x00007f47997cc422 in destroy_event () from /nix/store/ia6jgf3yw2nrz0704dbnnk09bcrx6rsj-wlc-0.0.10/lib/libwlc.so.0
#5 0x00007f4798eda7bc in wl_client_destroy () from /nix/store/xyajc0iyp9z1pkmssfazjjsvw1r9kc68-wayland-1.12.0/lib/libwayland-server.so.0
#6 0x00007f4798eda8d8 in wl_client_connection_data () from /nix/store/xyajc0iyp9z1pkmssfazjjsvw1r9kc68-wayland-1.12.0/lib/libwayland-server.so.0
#7 0x00007f4798edcae2 in wl_event_loop_dispatch () from /nix/store/xyajc0iyp9z1pkmssfazjjsvw1r9kc68-wayland-1.12.0/lib/libwayland-server.so.0
#8 0x00007f4798edaf8a in wl_display_run () from /nix/store/xyajc0iyp9z1pkmssfazjjsvw1r9kc68-wayland-1.12.0/lib/libwayland-server.so.0
#9 0x00007f47997c992c in wlc_run () from /nix/store/ia6jgf3yw2nrz0704dbnnk09bcrx6rsj-wlc-0.0.10/lib/libwlc.so.0
#10 0x000000000040bc81 in main ()
#11 0x00007f47974f4560 in __libc_start_main () from /nix/store/yydnhs7migvlbl48wpsxan1yvq2icbr9-glibc-2.25-49/lib/libc.so.6
#12 0x000000000040be3a in _start () Do you have something regarding opengl disabled/enabled? What graphic card do you use? From 5e6491ac2ac33476fdc5afd681ba1c191b118629 Mon Sep 17 00:00:00 2001
From: Joerg Thalheim <joerg@thalheim.io>
Date: Tue, 17 Oct 2017 15:09:42 +0100
Subject: [PATCH] nixos/sway: add module
Signed-off-by: Joerg Thalheim <joerg@thalheim.io>
---
nixos/modules/module-list.nix | 1 +
nixos/modules/programs/sway.nix | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 nixos/modules/programs/sway.nix
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index a8cb957ffe2..e8fecafb2c8 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -99,6 +99,7 @@
./programs/ssh.nix
./programs/ssmtp.nix
./programs/sysdig.nix
+ ./programs/sway.nix
./programs/thefuck.nix
./programs/tmux.nix
./programs/venus.nix
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
new file mode 100644
index 00000000000..e0fcd0c1deb
--- /dev/null
+++ b/nixos/modules/programs/sway.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+{
+ options.programs.sway.enable = mkEnableOption "sway";
+
+ config = mkIf config.programs.sway.enable {
+ environment.systemPackages = [ pkgs.sway ];
+ security.wrappers.sway = {
+ source = "${pkgs.sway}/bin/sway";
+ capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
+ owner = "root";
+ group = "sway";
+ permissions = "u+rx,g+rx";
+ };
+
+ users.extraGroups.sway = {};
+ };
+}
--
2.14.2 |
Graphics card is
|
I have a Broadwell CPU + graphics. The version here keeps segfaulting while the old version seems to work. Can you make sure, you also tested the updated version and not the old? |
using proof of newer version of sway running:
|
Ok. With |
@Mic92 I tried propagating the |
ad8b7c3
to
5e6491a
Compare
I updated the nixos module to include xwayland and things work for me. |
Should we pick this into stable? |
Probably a good idea. This capability stuff was security relevant. |
I am trying to figure out how this module is supposed to work... Ideally, this module would just replace the xserver module and give me a UI to log in to etc. right? Also, would it not be better to sit in |
@NeQuissimus There were efforts on this, but none got finished and merged: |
Most likely. Here's someone was able to login via slim #19663 (comment) |
I mix-and-matched the PRs together but cannot get past SLiM or SDDM... |
@NeQuissimus Your patch works for me if
|
@NeQuissimus Perhaps something is wrong with your setup. If not using your patch:
If you disable xserver, then your should add |
I use this to configure sway: (I import it and have no other xserver-related config) I updated the Gist to reflect your changes. |
@NeQuissimus Thanks. I've took your updated patch and nixos-sway.nix, did
the same. And it works fine for me. To debug try following:
|
I will spend some more time with this over the weekend if I can. Once I have things working, I will send a PR with the contents of my Gist... |
Motivation for this change
comment said it segfaults, but worked fine for me.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)