mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/hyprland: add systemd.setPath.enable option
This commit adds systemd.setPath.enable option to hyprland module which sets the systemd path to include the current system's bin This is needed in Hyprland only setups, where opening links in applications like VS code do not work.
This commit is contained in:
parent
5c9bfde33c
commit
888accda88
@ -41,6 +41,15 @@ in
|
||||
portalPackage = mkPackageOption pkgs "xdg-desktop-portal-hyprland" { };
|
||||
|
||||
xwayland.enable = mkEnableOption (mdDoc "XWayland") // { default = true; };
|
||||
|
||||
systemd.setPath.enable = mkEnableOption null // {
|
||||
default = true;
|
||||
description = mdDoc ''
|
||||
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 {
|
||||
@ -63,6 +72,12 @@ in
|
||||
extraPortals = [ finalPortalPackage ];
|
||||
configPackages = mkDefault [ cfg.finalPackage ];
|
||||
};
|
||||
|
||||
systemd = mkIf cfg.systemd.setPath.enable {
|
||||
user.extraConfig = ''
|
||||
DefaultEnvironment="PATH=$PATH:/run/current-system/sw/bin"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
imports = with lib; [
|
||||
|
Loading…
Reference in New Issue
Block a user