mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
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:
parent
d13428b28b
commit
a808b01f42
@ -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}
|
||||
''
|
||||
|
@ -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 = ''
|
||||
|
Loading…
Reference in New Issue
Block a user