nixos/xfce4-14: remove and move to xfce
We want only one xfce module and packageset.
This commit is contained in:
parent
c5176abf81
commit
04e56aa016
@ -18,7 +18,7 @@ in
|
|||||||
# determines the default: later modules (if enabled) are preferred.
|
# determines the default: later modules (if enabled) are preferred.
|
||||||
# E.g., if Plasma 5 is enabled, it supersedes xterm.
|
# E.g., if Plasma 5 is enabled, it supersedes xterm.
|
||||||
imports = [
|
imports = [
|
||||||
./none.nix ./xterm.nix ./xfce.nix ./xfce4-14.nix ./plasma5.nix ./lumina.nix
|
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
|
||||||
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
|
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
|
||||||
./mate.nix ./pantheon.nix ./surf-display.nix
|
./mate.nix ./pantheon.nix ./surf-display.nix
|
||||||
];
|
];
|
||||||
|
@ -7,6 +7,32 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# added 2019-08-18
|
||||||
|
# needed to preserve some semblance of UI familarity
|
||||||
|
# with original XFCE module
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce4-14" "extraSessionCommands" ]
|
||||||
|
[ "services" "xserver" "displayManager" "sessionCommands" ])
|
||||||
|
|
||||||
|
# added 2019-11-04
|
||||||
|
# xfce4-14 module removed and promoted to xfce.
|
||||||
|
# Needed for configs that used xfce4-14 module to migrate to this one.
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce4-14" "enable" ]
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce" "enable" ])
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce4-14" "noDesktop" ]
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce" "noDesktop" ])
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce4-14" "enableXfwm" ]
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce" "enableXfwm" ])
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "xserver" "desktopManager" "xfce" "extraSessionCommands" ]
|
||||||
|
[ "services" "xserver" "displayManager" "sessionCommands" ])
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.xserver.desktopManager.xfce = {
|
services.xserver.desktopManager.xfce = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@ -30,14 +56,6 @@ in
|
|||||||
description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon).";
|
description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon).";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraSessionCommands = mkOption {
|
|
||||||
default = "";
|
|
||||||
type = types.lines;
|
|
||||||
description = ''
|
|
||||||
Shell commands executed just before XFCE is started.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
enableXfwm = mkOption {
|
enableXfwm = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
@ -48,76 +66,101 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs.xfce // pkgs; [
|
environment.systemPackages = with pkgs.xfce // pkgs; [
|
||||||
# Get GTK themes and gtk-update-icon-cache
|
glib # for gsettings
|
||||||
gtk2.out
|
gtk3.out # gtk-update-icon-cache
|
||||||
|
|
||||||
# Supplies some abstract icons such as:
|
gnome3.gnome-themes-extra
|
||||||
# utilities-terminal, accessories-text-editor
|
|
||||||
gnome3.adwaita-icon-theme
|
gnome3.adwaita-icon-theme
|
||||||
|
|
||||||
hicolor-icon-theme
|
hicolor-icon-theme
|
||||||
tango-icon-theme
|
tango-icon-theme
|
||||||
xfce4-icon-theme
|
xfce4-icon-theme
|
||||||
|
|
||||||
|
desktop-file-utils
|
||||||
|
shared-mime-info # for update-mime-database
|
||||||
|
|
||||||
|
# For a polkit authentication agent
|
||||||
|
polkit_gnome
|
||||||
|
|
||||||
# Needed by Xfce's xinitrc script
|
# Needed by Xfce's xinitrc script
|
||||||
# TODO: replace with command -v
|
xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||||
which
|
|
||||||
|
|
||||||
exo
|
exo
|
||||||
garcon
|
garcon
|
||||||
gtk-xfce-engine
|
|
||||||
libxfce4ui
|
libxfce4ui
|
||||||
tumbler
|
|
||||||
xfconf
|
xfconf
|
||||||
|
|
||||||
mousepad
|
mousepad
|
||||||
|
parole
|
||||||
ristretto
|
ristretto
|
||||||
xfce4-appfinder
|
xfce4-appfinder
|
||||||
xfce4-screenshooter
|
xfce4-screenshooter
|
||||||
xfce4-session
|
xfce4-session
|
||||||
xfce4-settings
|
xfce4-settings
|
||||||
|
xfce4-taskmanager
|
||||||
xfce4-terminal
|
xfce4-terminal
|
||||||
|
|
||||||
(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
||||||
thunar-volman # TODO: drop
|
] # TODO: NetworkManager doesn't belong here
|
||||||
] ++ (if config.hardware.pulseaudio.enable
|
++ optional config.networking.networkmanager.enable networkmanagerapplet
|
||||||
then [ xfce4-mixer-pulse xfce4-volumed-pulse ]
|
++ optional config.powerManagement.enable xfce4-power-manager
|
||||||
else [ xfce4-mixer xfce4-volumed ])
|
++ optionals config.hardware.pulseaudio.enable [
|
||||||
# TODO: NetworkManager doesn't belong here
|
pavucontrol
|
||||||
++ optionals config.networking.networkmanager.enable [ networkmanagerapplet ]
|
# volume up/down keys support:
|
||||||
++ optionals config.powerManagement.enable [ xfce4-power-manager ]
|
# xfce4-pulseaudio-plugin includes all the functionalities of xfce4-volumed-pulse
|
||||||
++ optionals cfg.enableXfwm [ xfwm4 ]
|
# but can only be used with xfce4-panel, so for no-desktop usage we still include
|
||||||
++ optionals (!cfg.noDesktop) [
|
# xfce4-volumed-pulse
|
||||||
xfce4-panel
|
(if cfg.noDesktop then xfce4-volumed-pulse else xfce4-pulseaudio-plugin)
|
||||||
|
] ++ optionals cfg.enableXfwm [
|
||||||
|
xfwm4
|
||||||
|
xfwm4-themes
|
||||||
|
] ++ optionals (!cfg.noDesktop) [
|
||||||
xfce4-notifyd
|
xfce4-notifyd
|
||||||
|
xfce4-panel
|
||||||
xfdesktop
|
xfdesktop
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
"/share/xfce4"
|
"/share/xfce4"
|
||||||
"/share/themes"
|
"/lib/xfce4"
|
||||||
"/share/gtksourceview-2.0"
|
"/share/gtksourceview-3.0"
|
||||||
|
"/share/gtksourceview-4.0"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
|
||||||
|
|
||||||
services.xserver.desktopManager.session = [{
|
services.xserver.desktopManager.session = [{
|
||||||
name = "xfce";
|
name = "xfce";
|
||||||
bgSupport = true;
|
bgSupport = true;
|
||||||
start = ''
|
start = ''
|
||||||
${cfg.extraSessionCommands}
|
${pkgs.runtimeShell} ${pkgs.xfce.xfce4-session.xinitrc} &
|
||||||
|
|
||||||
${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
|
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
'';
|
'';
|
||||||
}];
|
}];
|
||||||
|
|
||||||
services.xserver.updateDbusEnvironment = true;
|
services.xserver.updateDbusEnvironment = true;
|
||||||
|
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
||||||
|
|
||||||
# Enable helpful DBus services.
|
# Enable helpful DBus services.
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
services.accounts-daemon.enable = true;
|
||||||
services.upower.enable = config.powerManagement.enable;
|
services.upower.enable = config.powerManagement.enable;
|
||||||
|
services.gnome3.glib-networking.enable = true;
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
services.gvfs.package = pkgs.xfce.gvfs;
|
services.gvfs.package = pkgs.xfce.gvfs;
|
||||||
|
services.tumbler.enable = true;
|
||||||
|
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
|
||||||
|
services.xserver.libinput.enable = mkDefault true; # used in xfce4-settings-manager
|
||||||
|
|
||||||
|
# Enable default programs
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Shell integration for VTE terminals
|
||||||
|
programs.bash.vteIntegration = mkDefault true;
|
||||||
|
programs.zsh.vteIntegration = mkDefault true;
|
||||||
|
|
||||||
|
# Systemd services
|
||||||
|
systemd.packages = with pkgs.xfce; [
|
||||||
|
(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
||||||
|
] ++ optional (!cfg.noDesktop) xfce4-notifyd;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,149 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.xserver.desktopManager.xfce4-14;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
# added 2019-08-18
|
|
||||||
# needed to preserve some semblance of UI familarity
|
|
||||||
# with original XFCE module
|
|
||||||
imports = [
|
|
||||||
(mkRenamedOptionModule
|
|
||||||
[ "services" "xserver" "desktopManager" "xfce4-14" "extraSessionCommands" ]
|
|
||||||
[ "services" "xserver" "displayManager" "sessionCommands" ])
|
|
||||||
];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services.xserver.desktopManager.xfce4-14 = {
|
|
||||||
enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable the Xfce desktop environment.";
|
|
||||||
};
|
|
||||||
|
|
||||||
thunarPlugins = mkOption {
|
|
||||||
default = [];
|
|
||||||
type = types.listOf types.package;
|
|
||||||
example = literalExample "[ pkgs.xfce4-14.thunar-archive-plugin ]";
|
|
||||||
description = ''
|
|
||||||
A list of plugin that should be installed with Thunar.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
noDesktop = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon).";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableXfwm = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable the XFWM (default) window manager.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages = with pkgs.xfce4-14 // pkgs; [
|
|
||||||
glib # for gsettings
|
|
||||||
gtk3.out # gtk-update-icon-cache
|
|
||||||
|
|
||||||
gnome3.gnome-themes-extra
|
|
||||||
gnome3.adwaita-icon-theme
|
|
||||||
hicolor-icon-theme
|
|
||||||
tango-icon-theme
|
|
||||||
xfce4-icon-theme
|
|
||||||
|
|
||||||
desktop-file-utils
|
|
||||||
shared-mime-info # for update-mime-database
|
|
||||||
|
|
||||||
# For a polkit authentication agent
|
|
||||||
polkit_gnome
|
|
||||||
|
|
||||||
# Needed by Xfce's xinitrc script
|
|
||||||
xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
|
||||||
|
|
||||||
exo
|
|
||||||
garcon
|
|
||||||
libxfce4ui
|
|
||||||
xfconf
|
|
||||||
|
|
||||||
mousepad
|
|
||||||
parole
|
|
||||||
ristretto
|
|
||||||
xfce4-appfinder
|
|
||||||
xfce4-screenshooter
|
|
||||||
xfce4-session
|
|
||||||
xfce4-settings
|
|
||||||
xfce4-taskmanager
|
|
||||||
xfce4-terminal
|
|
||||||
|
|
||||||
(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
|
||||||
] # TODO: NetworkManager doesn't belong here
|
|
||||||
++ optional config.networking.networkmanager.enable networkmanagerapplet
|
|
||||||
++ optional config.powerManagement.enable xfce4-power-manager
|
|
||||||
++ optionals config.hardware.pulseaudio.enable [
|
|
||||||
pavucontrol
|
|
||||||
# volume up/down keys support:
|
|
||||||
# xfce4-pulseaudio-plugin includes all the functionalities of xfce4-volumed-pulse
|
|
||||||
# but can only be used with xfce4-panel, so for no-desktop usage we still include
|
|
||||||
# xfce4-volumed-pulse
|
|
||||||
(if cfg.noDesktop then xfce4-volumed-pulse else xfce4-pulseaudio-plugin)
|
|
||||||
] ++ optionals cfg.enableXfwm [
|
|
||||||
xfwm4
|
|
||||||
xfwm4-themes
|
|
||||||
] ++ optionals (!cfg.noDesktop) [
|
|
||||||
xfce4-notifyd
|
|
||||||
xfce4-panel
|
|
||||||
xfdesktop
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/xfce4"
|
|
||||||
"/lib/xfce4"
|
|
||||||
"/share/gtksourceview-3.0"
|
|
||||||
"/share/gtksourceview-4.0"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.xserver.desktopManager.session = [{
|
|
||||||
name = "xfce4-14";
|
|
||||||
bgSupport = true;
|
|
||||||
start = ''
|
|
||||||
${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
|
|
||||||
waitPID=$!
|
|
||||||
'';
|
|
||||||
}];
|
|
||||||
|
|
||||||
services.xserver.updateDbusEnvironment = true;
|
|
||||||
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
|
||||||
|
|
||||||
# Enable helpful DBus services.
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
security.polkit.enable = true;
|
|
||||||
services.accounts-daemon.enable = true;
|
|
||||||
services.upower.enable = config.powerManagement.enable;
|
|
||||||
services.gnome3.glib-networking.enable = true;
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
services.gvfs.package = pkgs.xfce.gvfs;
|
|
||||||
services.tumbler.enable = true;
|
|
||||||
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
|
|
||||||
services.xserver.libinput.enable = mkDefault true; # used in xfce4-settings-manager
|
|
||||||
|
|
||||||
# Enable default programs
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
# Shell integration for VTE terminals
|
|
||||||
programs.bash.vteIntegration = mkDefault true;
|
|
||||||
programs.zsh.vteIntegration = mkDefault true;
|
|
||||||
|
|
||||||
# Systemd services
|
|
||||||
systemd.packages = with pkgs.xfce4-14; [
|
|
||||||
(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
|
||||||
] ++ optional (!cfg.noDesktop) xfce4-notifyd;
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user