1 { config, lib, pkgs, ... }:
6 cfg = config.programs.xwayland;
11 options.programs.xwayland = {
13 enable = mkEnableOption (lib.mdDoc "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)");
15 defaultFontPath = mkOption {
17 default = optionalString config.fonts.fontDir.enable
18 "/run/current-system/sw/share/X11/fonts";
19 defaultText = literalExpression ''
20 optionalString config.fonts.fontDir.enable "/run/current-system/sw/share/X11/fonts"
22 description = lib.mdDoc ''
23 Default font path. Setting this option causes Xwayland to be rebuilt.
29 default = pkgs.xwayland.override (oldArgs: {
30 inherit (cfg) defaultFontPath;
32 defaultText = literalExpression ''
33 pkgs.xwayland.override (oldArgs: {
34 inherit (config.programs.xwayland) defaultFontPath;
37 description = lib.mdDoc "The Xwayland package to use.";
42 config = mkIf cfg.enable {
44 # Needed by some applications for fonts and default settings
45 environment.pathsToLink = [ "/share/X11" ];
47 environment.systemPackages = [ cfg.package ];