Unverified Commit 3ede32d1 authored by Connor Baker's avatar Connor Baker Committed by GitHub
Browse files

nixos/gdm: add extraPackages to extend XDG_DATA_DIRS (#507768)

parents 48137c84 b0ae5a67
Loading
Loading
Loading
Loading
+20 −7
Original line number Diff line number Diff line
@@ -169,6 +169,16 @@ in
        '';
      };

      extraPackages = lib.mkOption {
        type = lib.types.listOf lib.types.package;
        default = [ ];
        example = lib.literalExpression "[ pkgs.gnome-themes-extra ]";
        description = ''
          Additional packages to add to XDG_DATA_DIRS for GDM.
          The `/share` directory of each package will be added to the data path.
        '';
      };

    };

  };
@@ -221,13 +231,16 @@ in
        enable = true;
        environment = {
          GDM_X_SERVER_EXTRA_ARGS = toString (lib.filter (arg: arg != "-terminate") xdmcfg.xserverArgs);
          XDG_DATA_DIRS = lib.makeSearchPath "share" [
          XDG_DATA_DIRS = lib.makeSearchPath "share" (
            [
              gdm # for gnome-login.session
              config.services.displayManager.sessionData.desktops
              pkgs.gnome-control-center # for accessibility icon
              pkgs.adwaita-icon-theme
              pkgs.hicolor-icon-theme # empty icon theme as a base
          ];
            ]
            ++ cfg.extraPackages
          );
        }
        // lib.optionalAttrs (xSessionWrapper != null) {
          # Make GDM use this wrapper before running the session, which runs the