mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
Merge pull request #177389 from K900/plasma-exclude-packages
nixos/plasma5: add excludePackages option
This commit is contained in:
commit
512a26ae13
2 changed files with 120 additions and 100 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
let
|
||||
xcfg = config.services.xserver;
|
||||
|
@ -30,7 +30,7 @@ let
|
|||
inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
|
||||
inherit (pkgs) writeText;
|
||||
inherit (lib)
|
||||
getBin optionalString
|
||||
getBin optionalString literalExpression
|
||||
mkRemovedOptionModule mkRenamedOptionModule
|
||||
mkDefault mkIf mkMerge mkOption types;
|
||||
|
||||
|
@ -192,6 +192,13 @@ in
|
|||
default = false;
|
||||
};
|
||||
|
||||
excludePackages = mkOption {
|
||||
description = "List of default packages to exclude from the configuration";
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
example = literalExpression "[ pkgs.plasma5Packages.oxygen ]";
|
||||
};
|
||||
|
||||
# Internally allows configuring kdeglobals globally
|
||||
kdeglobals = mkOption {
|
||||
internal = true;
|
||||
|
@ -263,89 +270,94 @@ in
|
|||
environment.systemPackages =
|
||||
with libsForQt5;
|
||||
with plasma5; with kdeGear; with kdeFrameworks;
|
||||
[
|
||||
frameworkintegration
|
||||
kactivities
|
||||
kauth
|
||||
kcmutils
|
||||
kconfig
|
||||
kconfigwidgets
|
||||
kcoreaddons
|
||||
kdoctools
|
||||
kdbusaddons
|
||||
kdeclarative
|
||||
kded
|
||||
kdesu
|
||||
kdnssd
|
||||
kemoticons
|
||||
kfilemetadata
|
||||
kglobalaccel
|
||||
kguiaddons
|
||||
kiconthemes
|
||||
kidletime
|
||||
kimageformats
|
||||
kinit
|
||||
kirigami2 # In system profile for SDDM theme. TODO: wrapper.
|
||||
kio
|
||||
kjobwidgets
|
||||
knewstuff
|
||||
knotifications
|
||||
knotifyconfig
|
||||
kpackage
|
||||
kparts
|
||||
kpeople
|
||||
krunner
|
||||
kservice
|
||||
ktextwidgets
|
||||
kwallet
|
||||
kwallet-pam
|
||||
kwalletmanager
|
||||
kwayland
|
||||
kwayland-integration
|
||||
kwidgetsaddons
|
||||
kxmlgui
|
||||
kxmlrpcclient
|
||||
plasma-framework
|
||||
solid
|
||||
sonnet
|
||||
threadweaver
|
||||
let
|
||||
requiredPackages = [
|
||||
frameworkintegration
|
||||
kactivities
|
||||
kauth
|
||||
kcmutils
|
||||
kconfig
|
||||
kconfigwidgets
|
||||
kcoreaddons
|
||||
kdoctools
|
||||
kdbusaddons
|
||||
kdeclarative
|
||||
kded
|
||||
kdesu
|
||||
kdnssd
|
||||
kemoticons
|
||||
kfilemetadata
|
||||
kglobalaccel
|
||||
kguiaddons
|
||||
kiconthemes
|
||||
kidletime
|
||||
kimageformats
|
||||
kinit
|
||||
kirigami2 # In system profile for SDDM theme. TODO: wrapper.
|
||||
kio
|
||||
kjobwidgets
|
||||
knewstuff
|
||||
knotifications
|
||||
knotifyconfig
|
||||
kpackage
|
||||
kparts
|
||||
kpeople
|
||||
krunner
|
||||
kservice
|
||||
ktextwidgets
|
||||
kwallet
|
||||
kwallet-pam
|
||||
kwalletmanager
|
||||
kwayland
|
||||
kwayland-integration
|
||||
kwidgetsaddons
|
||||
kxmlgui
|
||||
kxmlrpcclient
|
||||
plasma-framework
|
||||
solid
|
||||
sonnet
|
||||
threadweaver
|
||||
|
||||
breeze-qt5
|
||||
kactivitymanagerd
|
||||
kde-cli-tools
|
||||
kdecoration
|
||||
kdeplasma-addons
|
||||
kgamma5
|
||||
khotkeys
|
||||
kscreen
|
||||
kscreenlocker
|
||||
kwayland
|
||||
kwin
|
||||
kwrited
|
||||
libkscreen
|
||||
libksysguard
|
||||
milou
|
||||
plasma-browser-integration
|
||||
plasma-integration
|
||||
polkit-kde-agent
|
||||
breeze-qt5
|
||||
kactivitymanagerd
|
||||
kde-cli-tools
|
||||
kdecoration
|
||||
kdeplasma-addons
|
||||
kgamma5
|
||||
khotkeys
|
||||
kscreen
|
||||
kscreenlocker
|
||||
kwayland
|
||||
kwin
|
||||
kwrited
|
||||
libkscreen
|
||||
libksysguard
|
||||
milou
|
||||
plasma-integration
|
||||
polkit-kde-agent
|
||||
|
||||
plasma-desktop
|
||||
plasma-workspace
|
||||
plasma-workspace-wallpapers
|
||||
plasma-desktop
|
||||
plasma-workspace
|
||||
plasma-workspace-wallpapers
|
||||
|
||||
konsole
|
||||
oxygen
|
||||
breeze-icons
|
||||
pkgs.hicolor-icon-theme
|
||||
|
||||
breeze-icons
|
||||
pkgs.hicolor-icon-theme
|
||||
kde-gtk-config
|
||||
breeze-gtk
|
||||
|
||||
kde-gtk-config
|
||||
breeze-gtk
|
||||
qtvirtualkeyboard
|
||||
|
||||
qtvirtualkeyboard
|
||||
|
||||
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||
]
|
||||
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||
];
|
||||
optionalPackages = [
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
oxygen
|
||||
];
|
||||
in
|
||||
requiredPackages
|
||||
++ utils.removePackagesByName optionalPackages cfg.excludePackages
|
||||
|
||||
# Phonon audio backend
|
||||
++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
|
||||
|
@ -457,27 +469,29 @@ in
|
|||
environment.systemPackages =
|
||||
with libsForQt5;
|
||||
with plasma5; with kdeGear; with kdeFrameworks;
|
||||
[
|
||||
ksystemstats
|
||||
kinfocenter
|
||||
kmenuedit
|
||||
plasma-systemmonitor
|
||||
spectacle
|
||||
systemsettings
|
||||
let
|
||||
requiredPackages = [
|
||||
ksystemstats
|
||||
kinfocenter
|
||||
kmenuedit
|
||||
plasma-systemmonitor
|
||||
spectacle
|
||||
systemsettings
|
||||
|
||||
dolphin
|
||||
dolphin-plugins
|
||||
ffmpegthumbs
|
||||
kdegraphics-thumbnailers
|
||||
khelpcenter
|
||||
kio-extras
|
||||
print-manager
|
||||
|
||||
elisa
|
||||
gwenview
|
||||
okular
|
||||
]
|
||||
;
|
||||
dolphin
|
||||
dolphin-plugins
|
||||
ffmpegthumbs
|
||||
kdegraphics-thumbnailers
|
||||
kio-extras
|
||||
];
|
||||
optionalPackages = [
|
||||
elisa
|
||||
gwenview
|
||||
okular
|
||||
khelpcenter
|
||||
print-manager
|
||||
];
|
||||
in requiredPackages ++ utils.removePackagesByName optionalPackages cfg.excludePackages;
|
||||
|
||||
systemd.user.services = {
|
||||
plasma-run-with-systemd = {
|
||||
|
|
|
@ -13,7 +13,10 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.defaultSession = "plasma";
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
services.xserver.desktopManager.plasma5 = {
|
||||
enable = true;
|
||||
excludePackages = [ pkgs.plasma5Packages.elisa ];
|
||||
};
|
||||
services.xserver.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
|
@ -40,6 +43,9 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||
with subtest("Check that logging in has given the user ownership of devices"):
|
||||
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
||||
|
||||
with subtest("Ensure Elisa is not installed"):
|
||||
machine.fail("which elisa")
|
||||
|
||||
with subtest("Run Dolphin"):
|
||||
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'")
|
||||
machine.wait_for_window(" Dolphin")
|
||||
|
|
Loading…
Reference in a new issue