nixos/plasma5: use plasma5Packages everywhere for clarity

This commit is contained in:
Sandro Jäckel 2022-12-25 21:02:41 +01:00
parent 21af9192e6
commit 3b73ab96a7
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -26,10 +26,8 @@ let
emptyValue.value = {};
};
libsForQt5 = pkgs.plasma5Packages;
inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
inherit (lib)
getBin optionalAttrs optionalString literalExpression
getBin optionalAttrs literalExpression
mkRemovedOptionModule mkRenamedOptionModule
mkDefault mkIf mkMerge mkOption mkPackageOptionMD types;
@ -65,7 +63,7 @@ let
# recognize that software that has been removed.
rm -fv $HOME/.cache/ksycoca*
${libsForQt5.kservice}/bin/kbuildsycoca5
${pkgs.plasma5Packages.kservice}/bin/kbuildsycoca5
'';
set_XDG_CONFIG_HOME = ''
@ -176,20 +174,19 @@ in
owner = "root";
group = "root";
capabilities = "cap_sys_nice+ep";
source = "${getBin plasma5.kwin}/bin/kwin_wayland";
source = "${getBin pkgs.plasma5Packages.kwin}/bin/kwin_wayland";
};
} // optionalAttrs (!cfg.runUsingSystemd) {
start_kdeinit = {
setuid = true;
owner = "root";
group = "root";
source = "${getBin libsForQt5.kinit}/libexec/kf5/start_kdeinit";
source = "${getBin pkgs.plasma5Packages.kinit}/libexec/kf5/start_kdeinit";
};
};
environment.systemPackages =
with libsForQt5;
with plasma5; with kdeGear; with kdeFrameworks;
with pkgs.plasma5Packages;
let
requiredPackages = [
frameworkintegration
@ -284,8 +281,8 @@ in
++ utils.removePackagesByName optionalPackages config.environment.plasma5.excludePackages
# Phonon audio backend
++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
++ lib.optional (cfg.phononBackend == "gstreamer") pkgs.plasma5Packages.phonon-backend-gstreamer
++ lib.optional (cfg.phononBackend == "vlc") pkgs.plasma5Packages.phonon-backend-vlc
# Optional hardware support features
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt pkgs.openobex pkgs.obexftp ]
@ -301,7 +298,7 @@ in
# Extra services for D-Bus activation
services.dbus.packages = [
plasma5.kactivitymanagerd
pkgs.plasma5Packages.kactivitymanagerd
];
environment.pathsToLink = [
@ -334,7 +331,7 @@ in
serif = [ "Noto Serif" ];
};
programs.ssh.askPassword = mkDefault "${plasma5.ksshaskpass.out}/bin/ksshaskpass";
programs.ssh.askPassword = mkDefault "${pkgs.plasma5Packages.ksshaskpass.out}/bin/ksshaskpass";
# Enable helpful DBus services.
services.accounts-daemon.enable = true;
@ -371,8 +368,8 @@ in
};
xdg.portal.enable = true;
xdg.portal.extraPortals = [ plasma5.xdg-desktop-portal-kde ];
xdg.portal.configPackages = mkDefault [ plasma5.xdg-desktop-portal-kde ];
xdg.portal.extraPortals = [ pkgs.plasma5Packages.xdg-desktop-portal-kde ];
xdg.portal.configPackages = mkDefault [ pkgs.plasma5Packages.xdg-desktop-portal-kde ];
# xdg-desktop-portal-kde expects PipeWire to be running.
# This does not, by default, replace PulseAudio.
services.pipewire.enable = mkDefault true;
@ -403,15 +400,14 @@ in
''
];
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-workspace ];
services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ];
# Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has
# many tiny bugs.
# See: https://github.com/NixOS/nixpkgs/issues/143272
services.xserver.displayManager.defaultSession = mkDefault "plasma";
environment.systemPackages =
with libsForQt5;
with plasma5; with kdeGear; with kdeFrameworks;
with pkgs.plasma5Packages;
let
requiredPackages = [
ksystemstats
@ -447,7 +443,7 @@ in
script = ''
${set_XDG_CONFIG_HOME}
${kdeFrameworks.kconfig}/bin/kwriteconfig5 \
${pkgs.plasma5Packages.kconfig}/bin/kwriteconfig5 \
--file startkderc --group General --key systemdBoot ${lib.boolToString cfg.runUsingSystemd}
'';
};
@ -475,8 +471,7 @@ in
];
environment.systemPackages =
with libsForQt5;
with plasma5; with kdeApplications; with kdeFrameworks;
with pkgs.plasma5Packages;
[
# Basic packages without which Plasma Mobile fails to work properly.
plasma-mobile
@ -535,7 +530,7 @@ in
};
};
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-mobile ];
services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ];
})
# Plasma Bigscreen