74 lines
2 KiB
Nix
74 lines
2 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
|
|
let
|
|
name = "plasma";
|
|
cfg = config.nixowos.defaults.${name};
|
|
in
|
|
{
|
|
options.nixowos.defaults.${name} = {
|
|
enable = lib.mkEnableOption name;
|
|
|
|
# TODO: move
|
|
startOnFirstTTY = lib.mkEnableOption "starting plasma from tty1" // {
|
|
description = ''
|
|
Whether to start ${name} automatically from tty1.
|
|
|
|
note: this replaces sddm, which also means kwallet will not be unlocked automatically.
|
|
kwallet is responsible for storing secrets, using your password for encryption.
|
|
It's used by browsers, NetworkManager, and many more.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
hardware.graphics.enable = true;
|
|
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
lib.mkIf config.nixowos.allowAddingPackages [
|
|
kdePackages.plasma-keyboard
|
|
kdePackages.qtvirtualkeyboard
|
|
wl-clipboard
|
|
];
|
|
|
|
environment.interactiveShellInit =
|
|
lib.mkIf cfg.startOnFirstTTY
|
|
/* sh */ "test $(tty) = /dev/tty1 && exec startplasma-wayland";
|
|
|
|
services.displayManager.sddm.enable = lib.mkIf cfg.startOnFirstTTY false;
|
|
|
|
# remove plasma6 packages included by default
|
|
# from optionalPackages defined in nixpkgs/nixos/modules/services/desktop-managers/plasma6.nix
|
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
# aurorae
|
|
plasma-browser-integration
|
|
plasma-workspace-wallpapers
|
|
# konsole
|
|
kwin-x11
|
|
# (lib.getBin qttools) # Expose qdbus in PATH
|
|
# ark
|
|
elisa
|
|
# gwenview
|
|
# okular
|
|
# kate
|
|
# ktexteditor # provides elevated actions for kate
|
|
# khelpcenter
|
|
# dolphin
|
|
# baloo-widgets # baloo information in Dolphin
|
|
# dolphin-plugins
|
|
# spectacle
|
|
# ffmpegthumbs
|
|
krdp
|
|
# kconfig # required for xdg-terminal from xdg-utils
|
|
# qtbase # for qtpaths which is required for xdg-mime from xdg-utils
|
|
];
|
|
|
|
# use kdeconnect (opens ports)
|
|
programs.kdeconnect.enable = true;
|
|
};
|
|
}
|