about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2023-08-30 19:30:54 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2023-08-30 19:30:54 +0200
commitc90da9671fc1d7bc49ed1bfccfca19f922f89528 (patch)
treea57c57e0e44ba4187b54d853fa4cab7662901cec /modules
parentHosts: Sway: Launch autostart scripts (diff)
downloadnixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.tar.gz
nixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.tar.bz2
nixos-config-c90da9671fc1d7bc49ed1bfccfca19f922f89528.zip
Wayland: Add 'wayland-session' script and bug note
Diffstat (limited to 'modules')
-rw-r--r--modules/xorg/default.nix11
1 files changed, 11 insertions, 0 deletions
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;