2024-04-07 22:16:33 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
2024-05-23 23:21:23 -04:00
|
|
|
}: let
|
|
|
|
plasmaCsAdjuster = pkgs.writeShellScriptBin "plasma-cs-adjuster" ''
|
|
|
|
# Query the Desktop Portal Service for the current color scheme
|
|
|
|
color_scheme=$(${lib.getExe' pkgs.kdePackages.qttools "qdbus"} org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read org.freedesktop.appearance color-scheme)
|
|
|
|
|
|
|
|
# Check the color scheme and apply the appropriate look and feel
|
|
|
|
if [ "$color_scheme" = "1" ]; then
|
|
|
|
${lib.getExe' pkgs.kdePackages.plasma-workspace "plasma-apply-lookandfeel"} -a org.kde.breeze.desktop
|
|
|
|
else
|
|
|
|
${lib.getExe' pkgs.kdePackages.plasma-workspace "plasma-apply-lookandfeel"} -a org.kde.breezedark.desktop
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
in {
|
2024-04-17 22:39:00 -04:00
|
|
|
config = lib.mkIf config.alyraffauf.desktop.plasma.enable {
|
2024-05-23 23:21:23 -04:00
|
|
|
environment.systemPackages = with pkgs;
|
|
|
|
[
|
|
|
|
kdePackages.kate
|
|
|
|
kdePackages.kimageformats
|
|
|
|
kdePackages.kio-gdrive
|
|
|
|
kdePackages.sddm-kcm
|
|
|
|
maliit-keyboard
|
|
|
|
]
|
|
|
|
++ [plasmaCsAdjuster];
|
2024-03-28 16:13:46 -04:00
|
|
|
|
|
|
|
programs.kdeconnect.enable = true;
|
|
|
|
security.pam.services.sddm.enableGnomeKeyring = true;
|
2024-05-27 21:39:30 -04:00
|
|
|
services = {
|
|
|
|
desktopManager.plasma6.enable = true;
|
2024-06-02 18:48:04 -04:00
|
|
|
displayManager.sddm = {
|
|
|
|
enable = true;
|
|
|
|
wayland.enable = true;
|
2024-05-27 21:39:30 -04:00
|
|
|
};
|
|
|
|
};
|
2024-03-28 16:13:46 -04:00
|
|
|
};
|
2024-03-28 16:40:23 -04:00
|
|
|
}
|