From a808b01f42214fbb91b886c1816db114f3a2488b Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sat, 22 Jun 2024 22:29:19 +0800 Subject: [PATCH] nixos/programs/gnome-session: remove `sessions..display` I don't want to deal with opening up migration options for something that will be surely culled in the future so we'll go Wayland-exclusive for this. --- .../nixos/programs/gnome-session/default.nix | 29 ++----------------- .../gnome-session/submodules/session-type.nix | 10 ------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/modules/nixos/programs/gnome-session/default.nix b/modules/nixos/programs/gnome-session/default.nix index d044b712..84b55851 100644 --- a/modules/nixos/programs/gnome-session/default.nix +++ b/modules/nixos/programs/gnome-session/default.nix @@ -39,32 +39,6 @@ let ${lib.getExe' cfg.package "gnome-session"} ${lib.escapeShellArgs session.extraArgs} ''; - displayScripts = - let - hasMoreDisplays = protocol: lib.optionalString (lib.length session.display > 1) "fullName='${session.fullName} (${protocol})'"; - in - { - wayland = '' - ( - DISPLAY_SESSION_FILE="$out/share/wayland-sessions/${session.name}.desktop" - install -Dm0644 "$displaySessionPath" "$DISPLAY_SESSION_FILE" - ${hasMoreDisplays "Wayland"} substituteAllInPlace "$DISPLAY_SESSION_FILE" - ) - ''; - x11 = '' - ( - DISPLAY_SESSION_FILE="$out/share/xsessions/${session.name}.desktop" - install -Dm0644 "$displaySessionPath" "$DISPLAY_SESSION_FILE" - ${hasMoreDisplays "X11"} substituteAllInPlace "$DISPLAY_SESSION_FILE" - ) - ''; - }; - - installDesktopSessionFiles = builtins.map - (display: - displayScripts.${display}) - session.display; - installDesktopFiles = lib.mapAttrsToList (name: component: @@ -94,7 +68,8 @@ let install -Dm0644 "$gnomeSessionPath" "$GNOME_SESSION_FILE" substituteAllInPlace "$GNOME_SESSION_FILE" - ${lib.concatStringsSep "\n" installDesktopSessionFiles} + DISPLAY_SESSION_FILE="$out/share/wayland-sessions/${session.name}.desktop" + install -Dm0644 "$displaySessionPath" "$DISPLAY_SESSION_FILE" ${lib.concatStringsSep "\n" installDesktopFiles} '' diff --git a/modules/nixos/programs/gnome-session/submodules/session-type.nix b/modules/nixos/programs/gnome-session/submodules/session-type.nix index 63511b71..0afa6a65 100644 --- a/modules/nixos/programs/gnome-session/submodules/session-type.nix +++ b/modules/nixos/programs/gnome-session/submodules/session-type.nix @@ -78,16 +78,6 @@ in example = [ "GNOME" "Garden" ]; }; - display = lib.mkOption { - type = with lib.types; listOf (enum [ "wayland" "x11" ]); - description = '' - A list of display server protocols supported by the desktop - environment. - ''; - default = [ "wayland" ]; - example = [ "wayland" "x11" ]; - }; - description = lib.mkOption { type = lib.types.nonEmptyStr; description = ''