diff --git a/nixos/modules/programs/partition-manager.nix b/nixos/modules/programs/partition-manager.nix index cf0491ff028f..63b637f9952b 100644 --- a/nixos/modules/programs/partition-manager.nix +++ b/nixos/modules/programs/partition-manager.nix @@ -1,19 +1,21 @@ { config, lib, pkgs, ... }: -with lib; +let + cfg = config.programs.partition-manager; +in { + meta.maintainers = [ lib.maintainers.oxalica ]; -{ - meta.maintainers = [ maintainers.oxalica ]; - - ###### interface options = { - programs.partition-manager.enable = mkEnableOption (lib.mdDoc "KDE Partition Manager"); + programs.partition-manager = { + enable = lib.mkEnableOption (lib.mdDoc "KDE Partition Manager"); + + package = lib.mkPackageOption pkgs [ "libsForQt5" "partitionmanager" ] { }; + }; }; - ###### implementation - config = mkIf config.programs.partition-manager.enable { - services.dbus.packages = [ pkgs.libsForQt5.kpmcore ]; + config = lib.mkIf config.programs.partition-manager.enable { + services.dbus.packages = [ cfg.package.kpmcore ]; # `kpmcore` need to be installed to pull in polkit actions. - environment.systemPackages = [ pkgs.libsForQt5.kpmcore pkgs.libsForQt5.partitionmanager ]; + environment.systemPackages = [ cfg.package.kpmcore cfg.package ]; }; } diff --git a/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix index e20b431f0b58..5f1f2cec79e8 100644 --- a/nixos/modules/services/desktop-managers/plasma6.nix +++ b/nixos/modules/services/desktop-managers/plasma6.nix @@ -286,6 +286,7 @@ in { }; programs.kdeconnect.package = kdePackages.kdeconnect-kde; + programs.partition-manager.package = kdePackages.partitionmanager; # FIXME: ugly hack. See #292632 for details. system.userActivationScripts.rebuildSycoca = activationScript; diff --git a/pkgs/applications/kde/partitionmanager/default.nix b/pkgs/applications/kde/partitionmanager/default.nix index a898984d4502..90adde782c7f 100644 --- a/pkgs/applications/kde/partitionmanager/default.nix +++ b/pkgs/applications/kde/partitionmanager/default.nix @@ -1,5 +1,4 @@ { mkDerivation -, fetchurl , lib , extra-cmake-modules , kdoctools @@ -80,6 +79,10 @@ mkDerivation { ) ''; + passthru = { + inherit kpmcore; + }; + meta = with lib; { description = "KDE Partition Manager"; longDescription = '' diff --git a/pkgs/kde/gear/partitionmanager/default.nix b/pkgs/kde/gear/partitionmanager/default.nix index 3d0215cb5e64..68cb09a01a5a 100644 --- a/pkgs/kde/gear/partitionmanager/default.nix +++ b/pkgs/kde/gear/partitionmanager/default.nix @@ -6,5 +6,10 @@ mkKdeDerivation { pname = "partitionmanager"; propagatedUserEnvPkgs = [kpmcore]; + + passthru = { + inherit kpmcore; + }; + meta.mainProgram = "partitionmanager"; }