diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-08-30 19:30:54 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-08-30 19:30:54 +0200 |
commit | c90da9671fc1d7bc49ed1bfccfca19f922f89528 (patch) | |
tree | a57c57e0e44ba4187b54d853fa4cab7662901cec | |
parent | Hosts: Sway: Launch autostart scripts (diff) | |
download | nixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.tar.gz nixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.tar.bz2 nixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.zip |
Wayland: Add 'wayland-session' script and bug note
-rw-r--r-- | dotfiles/.bash_profile | 2 | ||||
-rw-r--r-- | modules/xorg/default.nix | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/dotfiles/.bash_profile b/dotfiles/.bash_profile index e43c2ff..cdd85c1 100644 --- a/dotfiles/.bash_profile +++ b/dotfiles/.bash_profile @@ -18,7 +18,7 @@ if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then export MOZ_ENABLE_WAYLAND=1 export LIBSEAT_BACKEND="logind" export NIXOS_OZONE_WL=1 - exec dbus-run-session sway --unsupported-gpu + exec wayland-session sway --unsupported-gpu fi # StartX diff --git a/modules/xorg/default.nix b/modules/xorg/default.nix index 74f7e85..0d5ffff 100644 --- a/modules/xorg/default.nix +++ b/modules/xorg/default.nix @@ -1,5 +1,16 @@ { config, pkgs, ... }: { + # Starting graphical-session.target doesn't work coz systemd. NixOS has a bug + # where the graphical-session.target isn't started on wayland (https://github.com/NixOS/nixpkgs/issues/169143). + # We are kind of screwed :) + environment.systemPackages = [ + (pkgs.writeShellScriptBin "wayland-session" '' + /run/current-system/systemd/bin/systemctl --user start graphical-session.target + dbus-run-session "$@" + /run/current-system/systemd/bin/systemctl --user stop graphical-session.target + '') + ]; + services.xserver = { enable = true; |