0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #207722 from SuperSandro2000/plasma5-cleanup-pkgs

nixos/plasma5: use plasma5Packages everywhere for clarity
This commit is contained in:
K900 2024-01-14 22:30:39 +03:00 committed by GitHub
commit ceede53bfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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