mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-26 08:48:38 +03:00
Merge pull request #298896 from JohnRTitor/master
nixos/hyprland: Add systemd.setPath.enable option to include system and user bin directory in PATH
This commit is contained in:
commit
1155526bf8
@ -13,7 +13,7 @@ in
|
|||||||
{
|
{
|
||||||
options.programs.hyprland = {
|
options.programs.hyprland = {
|
||||||
enable = mkEnableOption null // {
|
enable = mkEnableOption null // {
|
||||||
description = mdDoc ''
|
description = ''
|
||||||
Hyprland, the dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
|
Hyprland, the dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
|
||||||
|
|
||||||
You can manually launch Hyprland by executing {command}`Hyprland` on a TTY.
|
You can manually launch Hyprland by executing {command}`Hyprland` on a TTY.
|
||||||
@ -33,14 +33,24 @@ in
|
|||||||
};
|
};
|
||||||
defaultText = literalExpression
|
defaultText = literalExpression
|
||||||
"`programs.hyprland.package` with applied configuration";
|
"`programs.hyprland.package` with applied configuration";
|
||||||
description = mdDoc ''
|
description = ''
|
||||||
The Hyprland package after applying configuration.
|
The Hyprland package after applying configuration.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
portalPackage = mkPackageOption pkgs "xdg-desktop-portal-hyprland" { };
|
portalPackage = mkPackageOption pkgs "xdg-desktop-portal-hyprland" { };
|
||||||
|
|
||||||
xwayland.enable = mkEnableOption (mdDoc "XWayland") // { default = true; };
|
xwayland.enable = mkEnableOption ("XWayland") // { default = true; };
|
||||||
|
|
||||||
|
systemd.setPath.enable = mkEnableOption null // {
|
||||||
|
default = true;
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@ -63,6 +73,12 @@ in
|
|||||||
extraPortals = [ finalPortalPackage ];
|
extraPortals = [ finalPortalPackage ];
|
||||||
configPackages = mkDefault [ cfg.finalPackage ];
|
configPackages = mkDefault [ cfg.finalPackage ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd = mkIf cfg.systemd.setPath.enable {
|
||||||
|
user.extraConfig = ''
|
||||||
|
DefaultEnvironment="PATH=$PATH:/run/current-system/sw/bin:/etc/profiles/per-user/$USER/bin:/run/wrappers/bin"
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = with lib; [
|
imports = with lib; [
|
||||||
|
Loading…
Reference in New Issue
Block a user