From ff0738b736f7b890990bf083e12b7d40d4b9bd59 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:41:50 +0530 Subject: [PATCH] nixos/hyprland: set systemd environment PATH for versions < 0.41.2 Importing PATH into the systemd environment is done by default in Hyprland v0.41.2+ (https://github.com/hyprwm/Hyprland/pull/6640) We soft deprecate this option here for versions >= 0.41.2. --- nixos/modules/programs/wayland/hyprland.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/wayland/hyprland.nix b/nixos/modules/programs/wayland/hyprland.nix index 575adc79cf10..6e69c1730e57 100644 --- a/nixos/modules/programs/wayland/hyprland.nix +++ b/nixos/modules/programs/wayland/hyprland.nix @@ -38,12 +38,13 @@ in xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; }; systemd.setPath.enable = lib.mkEnableOption null // { - default = true; + default = lib.versionOlder cfg.package.version "0.41.2"; + defaultText = lib.literalExpression ''lib.versionOlder cfg.package.version "0.41.2"''; example = false; description = '' Set environment path of systemd to include the current system's bin directory. This is needed in Hyprland setups, where opening links in applications do not work. - Enabled by default. + Enabled by default for Hyprland versions older than 0.41.2. ''; }; };