Unverified Commit 35a3cb94 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge #269032: GNOME: 44 -> 45

parents 489d27a2 0edd4585
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
  "mpd.conf(5)": "https://mpd.readthedocs.io/en/latest/mpd.conf.5.html",
  "nix.conf(5)": "https://nixos.org/manual/nix/stable/command-ref/conf-file.html",

  "portals.conf(5)": "https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in",

  "journald.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.html",
  "logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html",
  "networkd.conf(5)": "https://www.freedesktop.org/software/systemd/man/networkd.conf.html",
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@

- PostgreSQL now defaults to major version 15.

- GNOME has been updated to version 45, see the [release notes](https://release.gnome.org/45/) for details. Notably, Loupe has replaced Eye of GNOME as the default image viewer, Snapshot has replaced Cheese as the default camera application, and Photos will no longer be installed.

- Support for WiFi6 (IEEE 802.11ax) and WPA3-SAE-PK was enabled in the `hostapd` package, along with a significant rework of the hostapd module.

- LXD now supports virtual machine instances to complement the existing container support
@@ -172,6 +174,10 @@

- `python3.pkgs.fetchPypi` (and `python3Packages.fetchPypi`) has been deprecated in favor of top-level `fetchPypi`.

- xdg-desktop-portal has been updated to 1.18, which reworked how portal implementations are selected. If you roll your own desktop environment, you should either set `xdg.portal.config` or `xdg.portal.configPackages`, which allow fine-grained control over which portal backend to use for specific interfaces, as described in {manpage}`portals.conf(5)`.

  If you don't provide configurations, a portal backend will only be considered when the desktop you use matches its deprecated `UseIn` key. While some NixOS desktop modules should already ship one for you, it is suggested to test portal availability by trying [Door Knocker](https://flathub.org/apps/xyz.tytanium.DoorKnocker) and [ASHPD Demo](https://flathub.org/apps/com.belmoussaoui.ashpd.demo). If things regressed, you may run `G_MESSAGES_DEBUG=all /path/to/xdg-desktop-portal/libexec/xdg-desktop-portal` for ideas on which config file and which portals are chosen.

- `pass` now does not contain `password-store.el`.  Users should get `password-store.el` from Emacs lisp package set `emacs.pkgs.password-store`.

- `services.knot` now supports `.settings` from RFC42.  The previous `.extraConfig` still works the same, but it displays a warning now.
+67 −0
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ let
    mkRenamedOptionModule
    teams
    types;

  associationOptions = with types; attrsOf (
    coercedTo (either (listOf str) str) (x: lib.concatStringsSep ";" (lib.toList x)) str
  );
in

{
@@ -72,20 +76,76 @@ in
        See [#160923](https://github.com/NixOS/nixpkgs/issues/160923) for more info.
      '';
    };

    config = mkOption {
      type = types.attrsOf associationOptions;
      default = { };
      example = {
        x-cinnamon = {
          default = [ "xapp" "gtk" ];
        };
        pantheon = {
          default = [ "pantheon" "gtk" ];
          "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
        };
        common = {
          default = [ "gtk" ];
        };
      };
      description = lib.mdDoc ''
        Sets which portal backend should be used to provide the implementation
        for the requested interface. For details check {manpage}`portals.conf(5)`.

        Configs will be linked to `/etx/xdg/xdg-desktop-portal/` with the name `$desktop-portals.conf`
        for `xdg.portal.config.$desktop` and `portals.conf` for `xdg.portal.config.common`
        as an exception.
      '';
    };

    configPackages = mkOption {
      type = types.listOf types.package;
      default = [ ];
      example = lib.literalExpression "[ pkgs.gnome.gnome-session ]";
      description = lib.mdDoc ''
        List of packages that provide XDG desktop portal configuration, usually in
        the form of `share/xdg-desktop-portal/$desktop-portals.conf`.

        Note that configs in `xdg.portal.config` will be preferred if set.
      '';
    };
  };

  config =
    let
      cfg = config.xdg.portal;
      packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals;
      configPackages = cfg.configPackages;

      joinedPortals = pkgs.buildEnv {
        name = "xdg-portals";
        paths = packages;
        pathsToLink = [ "/share/xdg-desktop-portal/portals" "/share/applications" ];
      };

      joinedPortalConfigs = pkgs.buildEnv {
        name = "xdg-portal-configs";
        paths = configPackages;
        pathsToLink = [ "/share/xdg-desktop-portal" ];
      };
    in
    mkIf cfg.enable {
      warnings = lib.optional (cfg.configPackages == [ ] && cfg.config == { }) ''
        xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you
        should either set `xdg.portal.config` or `xdg.portal.configPackages`
        to specify which portal backend to use for the requested interface.

        https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in

        If you simply want to keep the behaviour in < 1.17, which uses the first
        portal implementation found in lexicographical order, use the following:

        xdg.portal.config.common.default = "*";
      '';

      assertions = [
        {
@@ -108,7 +168,14 @@ in
          GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
          NIXOS_XDG_OPEN_USE_PORTAL = mkIf cfg.xdgOpenUsePortal "1";
          XDG_DESKTOP_PORTAL_DIR = "${joinedPortals}/share/xdg-desktop-portal/portals";
          NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR = mkIf (cfg.configPackages != [ ]) "${joinedPortalConfigs}/share/xdg-desktop-portal";
        };

        etc = lib.concatMapAttrs
          (desktop: conf: lib.optionalAttrs (conf != { }) {
            "xdg/xdg-desktop-portal/${lib.optionalString (desktop != "common") "${desktop}-"}portals.conf".text =
              lib.generators.toINI { } { preferred = conf; };
          }) cfg.config;
      };
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ in
    xdg.portal = {
      enable = mkDefault true;
      extraPortals = [ finalPortalPackage ];
      configPackages = mkDefault [ cfg.finalPackage ];
    };
  };

+2 −0
Original line number Diff line number Diff line
@@ -149,6 +149,8 @@ in {
            "sway/config".source = mkOptionDefault "${cfg.package}/etc/sway/config";
          };
        };
        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
        xdg.portal.config.sway.default = mkDefault [ "wlr" "gtk" ];
        # To make a Sway session available if a display manager like SDDM is enabled:
        services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; }
      (import ./wayland-session.nix { inherit lib pkgs; })
Loading