mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Merge pull request #66859 from worldofpeace/xfce4-14-module
nixos/xfce4-14: init
This commit is contained in:
commit
27a4afefbe
@ -18,7 +18,7 @@ in
|
||||
# determines the default: later modules (if enabled) are preferred.
|
||||
# E.g., if Plasma 5 is enabled, it supersedes xterm.
|
||||
imports = [
|
||||
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
|
||||
./none.nix ./xterm.nix ./xfce.nix ./xfce4-14.nix ./plasma5.nix ./lumina.nix
|
||||
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
|
||||
./mate.nix ./pantheon.nix ./surf-display.nix
|
||||
];
|
||||
|
157
nixos/modules/services/x11/desktop-managers/xfce4-14.nix
Normal file
157
nixos/modules/services/x11/desktop-managers/xfce4-14.nix
Normal file
@ -0,0 +1,157 @@
|
||||
{ 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.";
|
||||
};
|
||||
|
||||
# TODO: support thunar plugins
|
||||
# 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.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
|
||||
gtk-xfce-engine
|
||||
libxfce4ui
|
||||
xfconf
|
||||
|
||||
mousepad
|
||||
ristretto
|
||||
xfce4-appfinder
|
||||
xfce4-screenshooter
|
||||
xfce4-session
|
||||
xfce4-settings
|
||||
xfce4-terminal
|
||||
|
||||
# TODO: resync patch for plugins
|
||||
#(thunar.override { thunarPlugins = cfg.thunarPlugins; })
|
||||
thunar
|
||||
] # TODO: NetworkManager doesn't belong here
|
||||
++ optional config.networking.networkmanager.enable networkmanagerapplet
|
||||
++ optional config.hardware.pulseaudio.enable xfce4-pulseaudio-plugin
|
||||
++ optional config.powerManagement.enable xfce4-power-manager
|
||||
++ optional cfg.enableXfwm xfwm4
|
||||
++ optionals (!cfg.noDesktop) [
|
||||
xfce4-panel
|
||||
xfce4-notifyd
|
||||
xfdesktop
|
||||
];
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/share/xfce4"
|
||||
"/lib/xfce4"
|
||||
"/share/gtksourceview-3.0"
|
||||
"/share/gtksourceview-4.0"
|
||||
];
|
||||
|
||||
# Use the correct gnome3 packageSet
|
||||
networking.networkmanager.basePackages = mkIf config.networking.networkmanager.enable {
|
||||
inherit (pkgs) networkmanager modemmanager wpa_supplicant crda;
|
||||
inherit (pkgs.gnome3) networkmanager-openvpn networkmanager-vpnc
|
||||
networkmanager-openconnect networkmanager-fortisslvpn
|
||||
networkmanager-iodine networkmanager-l2tp;
|
||||
};
|
||||
|
||||
services.xserver.desktopManager.session = [{
|
||||
name = "xfce4-14";
|
||||
bgSupport = true;
|
||||
start = ''
|
||||
# Set GTK_PATH so that GTK+ can find the theme engines.
|
||||
export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
|
||||
|
||||
# Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
|
||||
export GTK_DATA_PREFIX=${config.system.path}
|
||||
|
||||
${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.dbus.packages =
|
||||
optional config.services.printing.enable pkgs.system-config-printer;
|
||||
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
|
||||
] ++ optional (!cfg.noDesktop) xfce4-notifyd;
|
||||
|
||||
};
|
||||
}
|
@ -136,6 +136,7 @@ in rec {
|
||||
(all nixos.tests.switchTest)
|
||||
(all nixos.tests.udisks2)
|
||||
(all nixos.tests.xfce)
|
||||
(all nixos.tests.xfce4-14)
|
||||
|
||||
nixpkgs.tarball
|
||||
(all allSupportedNixpkgs.emacs)
|
||||
|
@ -278,6 +278,7 @@ in
|
||||
xautolock = handleTest ./xautolock.nix {};
|
||||
xdg-desktop-portal = handleTest ./xdg-desktop-portal.nix {};
|
||||
xfce = handleTest ./xfce.nix {};
|
||||
xfce4-14 = handleTest ./xfce4-14.nix {};
|
||||
xmonad = handleTest ./xmonad.nix {};
|
||||
xrdp = handleTest ./xrdp.nix {};
|
||||
xss-lock = handleTest ./xss-lock.nix {};
|
||||
|
33
nixos/tests/xfce4-14.nix
Normal file
33
nixos/tests/xfce4-14.nix
Normal file
@ -0,0 +1,33 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "xfce4-14";
|
||||
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.auto.enable = true;
|
||||
services.xserver.displayManager.auto.user = "alice";
|
||||
|
||||
services.xserver.desktopManager.xfce4-14.enable = true;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
$machine->waitForFile("/home/alice/.Xauthority");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
$machine->waitForWindow(qr/xfce4-panel/);
|
||||
$machine->sleep(10);
|
||||
|
||||
# Check that logging in has given the user ownership of devices.
|
||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||
|
||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 xfce4-terminal &'");
|
||||
$machine->waitForWindow(qr/Terminal/);
|
||||
$machine->sleep(10);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
})
|
@ -58,8 +58,6 @@ makeScope newScope (self: with self; {
|
||||
|
||||
xfce4-dict = callPackage ./xfce4-dict { };
|
||||
|
||||
xfce4-mixer = callPackage ./xfce4-mixer { };
|
||||
|
||||
xfce4-netload-plugin = callPackage ./xfce4-netload-plugin { };
|
||||
|
||||
xfce4-notifyd = callPackage ./xfce4-notifyd { };
|
||||
@ -112,4 +110,10 @@ makeScope newScope (self: with self; {
|
||||
xfce4-namebar-plugin = callPackage ../xfce/panel-plugins/xfce4-namebar-plugin.nix { };
|
||||
|
||||
xfce4-windowck-plugin = callPackage ../xfce/panel-plugins/xfce4-windowck-plugin.nix { };
|
||||
|
||||
|
||||
## ALIASES
|
||||
|
||||
# added 2019-08-18
|
||||
xfce4-mixer = throw "deprecated 2019-08-18: obsoleted by xfce4-pulseaudio-plugin";
|
||||
})
|
||||
|
@ -1,32 +0,0 @@
|
||||
{ mkXfceDerivation, automakeAddFlags, dbus-glib, gtk2, libxfce4ui, libxfce4util, xfce4-panel, xfconf, gst-plugins-base, libunique }:
|
||||
|
||||
let
|
||||
gst_plugins_minimal = gst-plugins-base.override {
|
||||
minimalDeps = true;
|
||||
};
|
||||
in
|
||||
mkXfceDerivation rec {
|
||||
category = "apps";
|
||||
pname = "xfce4-mixer";
|
||||
version = "4.11.0";
|
||||
|
||||
sha256 = "1kiz5ysn4rqkjfzz4dvbsfj64kqqayg7bqakcys3rw28g2q5qyys";
|
||||
|
||||
nativeBuildInputs = [ automakeAddFlags ];
|
||||
|
||||
postPatch = ''
|
||||
automakeAddFlags panel-plugin/Makefile.am libmixer_la_CFLAGS DBUS_GLIB_CFLAGS
|
||||
automakeAddFlags xfce4-mixer/Makefile.am xfce4_mixer_CFLAGS DBUS_GLIB_CFLAGS
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
dbus-glib
|
||||
gst_plugins_minimal
|
||||
gtk2
|
||||
libunique
|
||||
libxfce4ui
|
||||
libxfce4util
|
||||
xfce4-panel
|
||||
xfconf
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user