mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
hyprland: dont recompile when disabling xwayland
xwayland can be disabled in the settings without recompiling hyprland
This commit is contained in:
committed by
Matthieu Coudron
parent
38e187fd2f
commit
c91dbdf61a
@@ -48,6 +48,11 @@ in
|
||||
[ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \
|
||||
[ "wayland" "windowManager" "hyprland" "systemd" "enable" ]
|
||||
)
|
||||
|
||||
(lib.mkRenamedOptionModule # \
|
||||
[ "wayland" "windowManager" "hyprland" "xwayland" "enable" ] # \
|
||||
[ "wayland" "windowManager" "hyprland" "settings" "xwayland" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
options.wayland.windowManager.hyprland = {
|
||||
@@ -79,11 +84,7 @@ in
|
||||
finalPackage = lib.mkOption {
|
||||
type = with lib.types; nullOr package;
|
||||
readOnly = true;
|
||||
default =
|
||||
if cfg.package != null then
|
||||
cfg.package.override { enableXWayland = cfg.xwayland.enable; }
|
||||
else
|
||||
null;
|
||||
default = if cfg.package != null then cfg.package else null;
|
||||
defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration";
|
||||
description = ''
|
||||
The Hyprland package after applying configuration.
|
||||
@@ -162,10 +163,6 @@ in
|
||||
{manpage}`systemd-xdg-autostart-generator(8)`'';
|
||||
};
|
||||
|
||||
xwayland.enable = lib.mkEnableOption "XWayland" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type =
|
||||
with lib.types;
|
||||
@@ -357,7 +354,10 @@ in
|
||||
submapWarnings ++ lib.optional inconsistent warning;
|
||||
|
||||
home.packages = lib.mkIf (cfg.package != null) (
|
||||
[ cfg.finalPackage ] ++ lib.optional cfg.xwayland.enable pkgs.xwayland
|
||||
[ cfg.finalPackage ]
|
||||
++ lib.optional (
|
||||
(lib.hasAttrByPath [ "settings" "xwayland" "enable" ] cfg) && cfg.settings.xwayland.enable
|
||||
) pkgs.xwayland
|
||||
);
|
||||
|
||||
xdg.configFile."hypr/hyprland.conf" =
|
||||
|
||||
Reference in New Issue
Block a user