mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 07:08:12 +09:00
fcitx5 on labwc
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
@@ -7,4 +12,31 @@ in
|
||||
enable = true;
|
||||
package = unstable.labwc;
|
||||
};
|
||||
|
||||
# NixOS decides whether a graphical session manages graphical-session.target
|
||||
# itself by checking XDG_CURRENT_DESKTOP against a hard-coded list. Labwc is
|
||||
# currently absent from that list, so NixOS starts
|
||||
# nixos-fake-graphical-session.target before Labwc is ready.
|
||||
#
|
||||
# This configuration uses Home Manager's Labwc systemd integration, which
|
||||
# imports the Wayland environment and starts labwc-session.target correctly.
|
||||
# Mark the Labwc session as systemd-aware before the display-manager wrapper
|
||||
# performs its hard-coded check. Otherwise services such as Fcitx5 can start
|
||||
# before WAYLAND_DISPLAY is available.
|
||||
#
|
||||
# Despite the services.xserver namespace, this session wrapper is also used
|
||||
# for Wayland sessions by display managers such as Ly.
|
||||
services.xserver.displayManager.sessionCommands = lib.mkAfter ''
|
||||
case ":''${XDG_CURRENT_DESKTOP:-}:" in
|
||||
*:labwc:*)
|
||||
case ":$XDG_CURRENT_DESKTOP:" in
|
||||
*:X-NIXOS-SYSTEMD-AWARE:*)
|
||||
;;
|
||||
*)
|
||||
export XDG_CURRENT_DESKTOP="$XDG_CURRENT_DESKTOP:X-NIXOS-SYSTEMD-AWARE"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user