Files
NixOS/plasma/plasma.nix
Cookiez 48378c963d Add support for customizable Plasma themes and configurations
- Introduced plasmaTheme variable in plasma.nix to allow selection between "desktop" and "laptop" themes.
- Created common theme configurations in common.nix, including keyboard shortcuts and application settings.
- Implemented desktop-specific configurations in desktop.nix, including panel layout, power management settings, and workspace appearance.
- Added laptop-specific configurations in laptop.nix, focusing on power-saving features and panel arrangements.
- Enhanced system monitoring widgets and battery management settings for both themes.
2026-02-16 16:20:16 +01:00

98 lines
2.3 KiB
Nix

{config, pkgs, username, project, ...}:
let
# Define the custom background package with the correct relative path
background-package = pkgs.stdenvNoCC.mkDerivation {
name = "background-image";
src = ../other/wallpaper4.png; # Place wallpaper.jpg in the same directory as this config file
dontUnpack = true;
installPhase = ''
cp $src $out
'';
};
plasmaTheme = "desktop"; #Possible values are "laptop" or "desktop"
in
{
imports =
[
./autostart.nix
../modules/stylix
];
# Pass the variable to home-manager
home-manager.extraSpecialArgs = {
inherit plasmaTheme;
};
home-manager.sharedModules = [
./home.nix
];
systemd.services = {
"plasma-workspace".serviceConfig.KillMode = "mixed";
"plasma-workspace".serviceConfig.TimeoutStopSec = "5s";
"sddm".serviceConfig.KillMode = "mixed";
};
programs.gamemode.enable = true;
services = {
xserver = {
enable = true;
videoDrivers = [ "amdgpu" ];
xkb = {
layout = "de";
variant = "";
};
desktopManager = {
#gnome.enable = true;
xterm.enable = false;
};
excludePackages = [ pkgs.xterm ];
## Enable sound with pipewire.
#services.pulseaudio.enable = false;
};
displayManager = {
sddm = {
enable = true;
theme = "breeze";
wayland.enable = true;
};
};
# Enable the KDE Plasma Desktop Environment.
desktopManager.plasma6.enable = true;
};
system.activationScripts.script.text = ''
source /home/${username}/${project}/other/colors.sh
source /home/${username}/${project}/other/pfp.sh
'';
environment = {
plasma6.excludePackages = with pkgs; [
kdePackages.elisa
];
systemPackages = with pkgs; [
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
[General]
background = "${background-package}"
'') #Custom SDDM theme with background image
kdePackages.plymouth-kcm
xdg-desktop-portal
kdePackages.xdg-desktop-portal-kde
kdePackages.plasma-workspace
kdePackages.kdialog
kdePackages.yakuake #Drop down Terminal
kdePackages.bluez-qt #Bluetooth management for KDE Plasma
kdePackages.kconfig #To Get infos about the current config, such as themes
];
};
}