nixos/programs/gnome-session: remove sessions.<name>.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.
This commit is contained in:
Gabriel Arazas 2024-06-22 22:29:19 +08:00
parent d13428b28b
commit a808b01f42
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 2 additions and 37 deletions

View File

@ -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}
''

View File

@ -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 = ''