nixos/xwayland: Correctly set the default package
This will fix #129922 and also improve the descriptions and default texts.
This commit is contained in:
parent
93460e0451
commit
e22bd59820
1 changed files with 14 additions and 8 deletions
|
@ -10,14 +10,16 @@ in
|
|||
{
|
||||
options.programs.xwayland = {
|
||||
|
||||
enable = mkEnableOption ''
|
||||
Xwayland X server allows running X programs on a Wayland compositor.
|
||||
'';
|
||||
enable = mkEnableOption "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)";
|
||||
|
||||
defaultFontPath = mkOption {
|
||||
type = types.str;
|
||||
default = optionalString config.fonts.fontDir.enable
|
||||
"/run/current-system/sw/share/X11/fonts";
|
||||
defaultText = literalExample ''
|
||||
optionalString config.fonts.fontDir.enable
|
||||
"/run/current-system/sw/share/X11/fonts";
|
||||
'';
|
||||
description = ''
|
||||
Default font path. Setting this option causes Xwayland to be rebuilt.
|
||||
'';
|
||||
|
@ -25,7 +27,15 @@ in
|
|||
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
description = "The Xwayland package";
|
||||
default = pkgs.xwayland.override (oldArgs: {
|
||||
inherit (cfg) defaultFontPath;
|
||||
});
|
||||
defaultText = literalExample ''
|
||||
pkgs.xwayland.override (oldArgs: {
|
||||
inherit (config.programs.xwayland) defaultFontPath;
|
||||
});
|
||||
'';
|
||||
description = "The Xwayland package to use.";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -37,9 +47,5 @@ in
|
|||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
programs.xwayland.package = pkgs.xwayland.override (oldArgs: {
|
||||
inherit (cfg) defaultFontPath;
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue