From c90da9671fc1d7bc49ed1bfccfca19f922f89528 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Wed, 30 Aug 2023 19:30:54 +0200 Subject: Wayland: Add 'wayland-session' script and bug note --- modules/xorg/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules') 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; -- cgit 1.4.1