[Desktop] Fix lauching GUI apps with sudo

Keep necessary environment variables
This commit is contained in:
Antoine Viallon 2023-01-01 20:03:59 +01:00
parent 1a7ac74017
commit bab9dfb6c8
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -224,6 +224,13 @@ in {
]; ];
services.packagekit.enable = mkDefault (!generalCfg.minimal); services.packagekit.enable = mkDefault (!generalCfg.minimal);
security.sudo.extraConfig =
''
# Keep X-related variables for better GUI integration
Defaults:root,%wheel env_keep+=XAUTHORITY
Defaults:root,%wheel env_keep+=DISPLAY
''
;
networking.networkmanager = { networking.networkmanager = {
plugins = [] plugins = []