diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-08-01 17:51:51 -0400 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-08-01 17:51:51 -0400 |
commit | 64b4a24047eb681730da1cb89eae01ff48bd8369 (patch) | |
tree | 96e1a10a83dd4189d8d0d98b958a60a42fd1140f /nixos/modules/config/xdg | |
parent | c2c77e7824b5cde369e9bfb9db1f4f68a88f02aa (diff) | |
download | nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar.gz nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar.bz2 nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar.lz nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar.xz nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.tar.zst nixpkgs-64b4a24047eb681730da1cb89eae01ff48bd8369.zip |
nixos/xdg/portal: set GTK_USE_PORTAL with lib.mkIf
If lib.optional is given a false value it will return an empty list. Thusly the set-environment script can have ``` export GTK_USE_PORTAL= ``` This can rub certain bugs the wrong way #65679 so lets make sure this isn't set in the environment at all.
Diffstat (limited to 'nixos/modules/config/xdg')
-rw-r--r-- | nixos/modules/config/xdg/portal.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/config/xdg/portal.nix b/nixos/modules/config/xdg/portal.nix index 89ddf80b575..bdbbfda2bb4 100644 --- a/nixos/modules/config/xdg/portal.nix +++ b/nixos/modules/config/xdg/portal.nix @@ -51,7 +51,7 @@ with lib; systemd.packages = packages; environment.variables = { - GTK_USE_PORTAL = optional cfg.gtkUsePortal "1"; + GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1"; XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals; }; }; |