nixos/xdg/portal: remove deprecated option gtkUsePortal
This commit is contained in:
parent
2b5b346090
commit
632da75711
@ -257,6 +257,8 @@
|
|||||||
- `ffmpeg_5` has been removed. Please use the unversioned `ffmpeg`,
|
- `ffmpeg_5` has been removed. Please use the unversioned `ffmpeg`,
|
||||||
pin a newer version, or if necessary pin `ffmpeg_4` for compatibility.
|
pin a newer version, or if necessary pin `ffmpeg_4` for compatibility.
|
||||||
|
|
||||||
|
- The `xdg.portal.gtkUsePortal` option has been removed, as it had been deprecated for over 2 years. Using the `GTK_USE_PORTAL` environment variable in this manner is not intended nor encouraged by the GTK developers, but can still be done manually via `environment.sessionVariables`.
|
||||||
|
|
||||||
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
||||||
|
|
||||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||||
|
@ -6,6 +6,7 @@ let
|
|||||||
mkIf
|
mkIf
|
||||||
mkOption
|
mkOption
|
||||||
mkRenamedOptionModule
|
mkRenamedOptionModule
|
||||||
|
mkRemovedOptionModule
|
||||||
teams
|
teams
|
||||||
types;
|
types;
|
||||||
|
|
||||||
@ -17,18 +18,7 @@ in
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(mkRenamedOptionModule [ "services" "flatpak" "extraPortals" ] [ "xdg" "portal" "extraPortals" ])
|
(mkRenamedOptionModule [ "services" "flatpak" "extraPortals" ] [ "xdg" "portal" "extraPortals" ])
|
||||||
|
(mkRemovedOptionModule [ "xdg" "portal" "gtkUsePortal" ] "This option has been removed due to being unsupported and discouraged by the GTK developers.")
|
||||||
({ config, lib, options, ... }:
|
|
||||||
let
|
|
||||||
from = [ "xdg" "portal" "gtkUsePortal" ];
|
|
||||||
fromOpt = lib.getAttrFromPath from options;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
warnings = lib.mkIf config.xdg.portal.gtkUsePortal [
|
|
||||||
"The option `${lib.showOption from}' defined in ${lib.showFiles fromOpt.files} has been deprecated. Setting the variable globally with `environment.sessionVariables' NixOS option can have unforeseen side-effects."
|
|
||||||
];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -54,18 +44,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
gtkUsePortal = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
visible = false;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Sets environment variable `GTK_USE_PORTAL` to `1`.
|
|
||||||
This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals
|
|
||||||
for features like file chooser but it is an unsupported hack that can easily break things.
|
|
||||||
Defaults to `false` to respect its opt-in nature.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
xdgOpenUsePortal = mkOption {
|
xdgOpenUsePortal = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -154,7 +132,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
|
|
||||||
NIXOS_XDG_OPEN_USE_PORTAL = mkIf cfg.xdgOpenUsePortal "1";
|
NIXOS_XDG_OPEN_USE_PORTAL = mkIf cfg.xdgOpenUsePortal "1";
|
||||||
NIX_XDG_DESKTOP_PORTAL_DIR = "/run/current-system/sw/share/xdg-desktop-portal/portals";
|
NIX_XDG_DESKTOP_PORTAL_DIR = "/run/current-system/sw/share/xdg-desktop-portal/portals";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user