{ config, pkgs, lib, flakeSelf, ... }: let # Set up the default kde options kdeglobals = lib.generators.toINI {} { KDE.LookAndFeelPackage = "org.kde.breezedarktint.desktop"; KDE.SingleClick = false; General = { accentColorFromWallpaper = true; AccentColor = "172,53,164" ; }; }; balooExcludedDirs = lib.strings.intersperse "," [ "$HOME/.cache/" "$HOME/.config/" "$HOME/.local/" ]; baloofilerc = lib.generators.toINI {} { General = { # The [$e] part allows you to use environment variables "exclude folders[$e]" = lib.strings.concatStrings balooExcludedDirs; }; }; # Make custom packages breezeTint = pkgs.stdenv.mkDerivation { name = "breeze-tint"; src = "${pkgs.breeze-qt5}"; patches = [ ./patches/BreezeTint.patch ]; installPhase = '' runHook preInstall mkdir -p $out/share/color-schemes/ cp -r share/color-schemes/* $out/share/color-schemes/ runHook postInstall ''; }; lookAndFeel = pkgs.stdenv.mkDerivation { name = "toast-look-and-feel"; src = ./look-and-feel; installPhase = '' runHook preInstall mkdir -p $out/share/plasma/look-and-feel/ cp -r xyz.toast003.customtheme.desktop $out/share/plasma/look-and-feel/ runHook postInstall ''; }; # /etc/xdg is not read by plasma, so to change the default settings you need to put them in a package plasmaDefaults = pkgs.stdenv.mkDerivation { name = "toast-plasma-defaults"; dontUnpack = true; installPhase = '' runHook preInstall set -x mkdir -p $out/etc/xdg echo "${kdeglobals}" > $out/etc/xdg/kdeglobals echo '${baloofilerc}' > $out/etc/xdg/baloofilerc runHook postInstall ''; }; in { services.xserver = { # Enable the Plasma 5 Desktop Environment desktopManager.plasma5.enable = true; displayManager.defaultSession = "plasmawayland"; }; # GTK apps need dconf to grab the correct theme on Wayland programs.dconf.enable = true; /* Install the patched Breeze color schemes and look and feel packages, as well as the plasma default configs */ environment.systemPackages = [ breezeTint lookAndFeel plasmaDefaults ]; # Plasma configs should be on all users home-manager.sharedModules = [{ imports = [ flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager ]; programs.plasma = { enable = true; workspace.clickItemTo = "select"; shortcuts = { "kwin" = { "Switch One Desktop to the Left" = [ "Meta+Ctrl+Left" ]; "Switch One Desktop to the Right" = [ "Meta+Ctrl+Right" ]; }; }; configFile = { "kwinrc" = { "Desktops" = { "Number" = 2; "Rows" = 1; }; "TabBox"."LayoutName" = "thumbnail_grid"; }; "plasmanotifyrc"."Notifications"."NormalAlwaysOnTop" = true; }; }; }]; }