159 lines
4.2 KiB
Nix
159 lines
4.2 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
flakeSelf,
|
|
...
|
|
}: let
|
|
# Set up the default kde options
|
|
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;
|
|
};
|
|
};
|
|
|
|
# /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 '${baloofilerc}' > $out/etc/xdg/baloofilerc
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in {
|
|
# Enable the Plasma 6 Desktop Environment
|
|
services.desktopManager.plasma6.enable = true;
|
|
|
|
qt.enable = true;
|
|
|
|
nixpkgs.overlays = [
|
|
(
|
|
final: prev: {
|
|
kdePackages = prev.kdePackages.overrideScope (
|
|
kFinal: kPrev: {
|
|
libplasma = kPrev.libplasma.overrideAttrs {
|
|
patches = [
|
|
../kde/patches/libplasma-pr1214.patch
|
|
];
|
|
};
|
|
kwin = kPrev.kwin.overrideAttrs {
|
|
patches = kPrev.kwin.patches ++ [
|
|
../kde/patches/kwin-pr6406.patch
|
|
];
|
|
};
|
|
konsole = kPrev.konsole.overrideAttrs {
|
|
patches = [
|
|
../kde/patches/konsole-pr767.patch
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|
|
)
|
|
];
|
|
|
|
# GTK apps need dconf to grab the correct theme on Wayland
|
|
programs.dconf.enable = true;
|
|
|
|
# Install the plasma default configs
|
|
environment.systemPackages = with pkgs.kdePackages; [
|
|
plasmaDefaults
|
|
plasma-thunderbolt
|
|
plasma-vault
|
|
];
|
|
|
|
# Plasma configs should be on all users
|
|
home-manager.sharedModules = [
|
|
{
|
|
imports = [flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager];
|
|
home.packages = [
|
|
(
|
|
pkgs.catppuccin-kde.override {
|
|
flavour = ["mocha"];
|
|
accents = ["mauve"];
|
|
winDecStyles = ["classic"];
|
|
}
|
|
)
|
|
];
|
|
programs.plasma = {
|
|
enable = true;
|
|
workspace = {
|
|
clickItemTo = "select";
|
|
cursor.theme = "Breeze_Light";
|
|
iconTheme = "breeze-dark";
|
|
lookAndFeel = "Catppuccin-Mocha-Mauve";
|
|
theme = "default";
|
|
colorScheme = "CatppuccinMochaMauve";
|
|
};
|
|
kwin = {
|
|
titlebarButtons = {
|
|
left = ["on-all-desktops" "keep-above-windows"];
|
|
right = ["minimize" "maximize" "close"];
|
|
};
|
|
virtualDesktops = {
|
|
rows = 1;
|
|
number = 2;
|
|
};
|
|
};
|
|
input = {
|
|
keyboard = {
|
|
layouts = [{layout = "es";}];
|
|
numlockOnStartup = "off";
|
|
};
|
|
};
|
|
panels = [
|
|
{
|
|
location = "bottom";
|
|
height = 44;
|
|
floating = true;
|
|
widgets = [
|
|
{
|
|
kickoff = {
|
|
icon = "nix-snowflake-white";
|
|
};
|
|
}
|
|
"org.kde.plasma.pager"
|
|
"org.kde.plasma.icontasks"
|
|
"org.kde.plasma.marginsseparator"
|
|
"org.kde.plasma.systemtray"
|
|
{
|
|
digitalClock = {
|
|
time.showSeconds = "always";
|
|
};
|
|
}
|
|
"org.kde.plasma.showdesktop"
|
|
];
|
|
}
|
|
];
|
|
shortcuts = {
|
|
"kwin" = {
|
|
"Switch One Desktop to the Left" = ["Meta+Ctrl+Left"];
|
|
"Switch One Desktop to the Right" = ["Meta+Ctrl+Right"];
|
|
};
|
|
};
|
|
configFile = {
|
|
"kwinrc" = {
|
|
"org.kde.kdecoration2"."BorderSize".value = "None";
|
|
"TabBox"."LayoutName".value = "thumbnail_grid";
|
|
};
|
|
"kdeglobals"."General"."AccentColor".value = null;
|
|
"auroraerc"."CatppuccinMocha-Classic"."ButtonSize".value = 0;
|
|
"plasmanotifyrc"."Notifications"."NormalAlwaysOnTop".value = true;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
}
|