mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
Xfce 4.20 (#353048)
This commit is contained in:
commit
d8890db135
29 changed files with 360 additions and 115 deletions
|
@ -69,6 +69,22 @@ in
|
|||
default = true;
|
||||
description = "Enable the XFCE screensaver.";
|
||||
};
|
||||
|
||||
enableWaylandSession = mkEnableOption "the experimental Xfce Wayland session";
|
||||
|
||||
waylandSessionCompositor = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "wayfire";
|
||||
description = ''
|
||||
Command line to run a Wayland compositor, defaults to `labwc --startup`
|
||||
if not specified. Note that `xfce4-session` will be passed to it as an
|
||||
argument, see `startxfce4 --help` for details.
|
||||
|
||||
Some compositors do not have an option equivalent to labwc's `--startup`
|
||||
and you might have to add xfce4-session somewhere in their configurations.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
environment.xfce.excludePackages = mkOption {
|
||||
|
@ -134,6 +150,8 @@ in
|
|||
programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-gtk2;
|
||||
programs.xfconf.enable = true;
|
||||
programs.thunar.enable = true;
|
||||
programs.labwc.enable = mkDefault (cfg.enableWaylandSession && (
|
||||
cfg.waylandSessionCompositor == "" || lib.substring 0 5 cfg.waylandSessionCompositor == "labwc"));
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/share/xfce4"
|
||||
|
@ -144,6 +162,7 @@ in
|
|||
|
||||
services.xserver.desktopManager.session = [{
|
||||
name = "xfce";
|
||||
prettyName = "Xfce Session";
|
||||
desktopNames = [ "XFCE" ];
|
||||
bgSupport = !cfg.noDesktop;
|
||||
start = ''
|
||||
|
@ -152,6 +171,22 @@ in
|
|||
'';
|
||||
}];
|
||||
|
||||
# Copied from https://gitlab.xfce.org/xfce/xfce4-session/-/blob/xfce4-session-4.19.2/xfce-wayland.desktop.in
|
||||
# to maintain consistent l10n state with X11 session file and to support the waylandSessionCompositor option.
|
||||
services.displayManager.sessionPackages = optionals cfg.enableWaylandSession [
|
||||
((pkgs.writeTextDir "share/wayland-sessions/xfce-wayland.desktop" ''
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Xfce Session (Wayland)
|
||||
Comment=Use this session to run Xfce as your desktop environment
|
||||
Exec=startxfce4 --wayland ${cfg.waylandSessionCompositor}
|
||||
Icon=
|
||||
Type=Application
|
||||
DesktopNames=XFCE
|
||||
Keywords=xfce;wayland;desktop;environment;session;
|
||||
'').overrideAttrs (_: { passthru.providedSessions = [ "xfce-wayland" ]; }))
|
||||
];
|
||||
|
||||
services.xserver.updateDbusEnvironment = true;
|
||||
programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
||||
|
||||
|
|
|
@ -279,6 +279,11 @@ in
|
|||
lib.mapCartesianProduct
|
||||
({dm, wm}: let
|
||||
sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}";
|
||||
prettyName =
|
||||
if dm.name != "none" then
|
||||
"${dm.prettyName or dm.name}${optionalString (wm.name != "none") (" (" + (wm.prettyName or wm.name) + ")")}"
|
||||
else
|
||||
(wm.prettyName or wm.name);
|
||||
script = xsession dm wm;
|
||||
desktopNames = if dm ? desktopNames
|
||||
then lib.concatStringsSep ";" dm.desktopNames
|
||||
|
@ -297,7 +302,7 @@ in
|
|||
Type=XSession
|
||||
TryExec=${script}
|
||||
Exec=${script}
|
||||
Name=${sessionName}
|
||||
Name=${prettyName}
|
||||
DesktopNames=${desktopNames}
|
||||
'';
|
||||
} // {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue