nixos: remove Plasma 5

K900 15a586f2 35d0bafa

+6 -905
-53
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
··· 1 - # This module defines a NixOS installation CD that contains X11 and 2 - # Plasma 5. 3 - 4 - { lib, pkgs, ... }: 5 - 6 - { 7 - imports = [ ./installation-cd-graphical-calamares.nix ]; 8 - 9 - isoImage.edition = lib.mkDefault "plasma5"; 10 - 11 - services.xserver.desktopManager.plasma5 = { 12 - enable = true; 13 - }; 14 - 15 - # Automatically login as nixos. 16 - services.displayManager = { 17 - sddm.enable = true; 18 - autoLogin = { 19 - enable = true; 20 - user = "nixos"; 21 - }; 22 - }; 23 - 24 - environment.systemPackages = with pkgs; [ 25 - # Graphical text editor 26 - plasma5Packages.kate 27 - ]; 28 - 29 - system.activationScripts.installerDesktop = 30 - let 31 - 32 - # Comes from documentation.nix when xserver and nixos.enable are true. 33 - manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop"; 34 - 35 - homeDir = "/home/nixos/"; 36 - desktopDir = homeDir + "Desktop/"; 37 - 38 - in 39 - '' 40 - mkdir -p ${desktopDir} 41 - chown nixos ${homeDir} ${desktopDir} 42 - 43 - ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"} 44 - ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"} 45 - ln -sfT ${pkgs.plasma5Packages.konsole}/share/applications/org.kde.konsole.desktop ${ 46 - desktopDir + "org.kde.konsole.desktop" 47 - } 48 - ln -sfT ${pkgs.calamares-nixos}/share/applications/calamares.desktop ${ 49 - desktopDir + "calamares.desktop" 50 - } 51 - ''; 52 - 53 - }
-7
nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix
··· 1 - { pkgs, ... }: 2 - 3 - { 4 - imports = [ ./installation-cd-graphical-plasma5.nix ]; 5 - 6 - boot.kernelPackages = pkgs.linuxPackages_latest; 7 - }
-50
nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
··· 1 - # This module defines a NixOS installation CD that contains X11 and 2 - # Plasma 5. 3 - 4 - { lib, pkgs, ... }: 5 - 6 - { 7 - imports = [ ./installation-cd-graphical-base.nix ]; 8 - 9 - isoImage.edition = lib.mkDefault "plasma5"; 10 - 11 - services.xserver.desktopManager.plasma5 = { 12 - enable = true; 13 - }; 14 - 15 - # Automatically login as nixos. 16 - services.displayManager = { 17 - sddm.enable = true; 18 - autoLogin = { 19 - enable = true; 20 - user = "nixos"; 21 - }; 22 - }; 23 - 24 - environment.systemPackages = with pkgs; [ 25 - # Graphical text editor 26 - plasma5Packages.kate 27 - ]; 28 - 29 - system.activationScripts.installerDesktop = 30 - let 31 - 32 - # Comes from documentation.nix when xserver and nixos.enable are true. 33 - manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop"; 34 - 35 - homeDir = "/home/nixos/"; 36 - desktopDir = homeDir + "Desktop/"; 37 - 38 - in 39 - '' 40 - mkdir -p ${desktopDir} 41 - chown nixos ${homeDir} ${desktopDir} 42 - 43 - ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"} 44 - ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"} 45 - ln -sfT ${pkgs.plasma5Packages.konsole}/share/applications/org.kde.konsole.desktop ${ 46 - desktopDir + "org.kde.konsole.desktop" 47 - } 48 - ''; 49 - 50 - }
+6
nixos/modules/rename.nix
··· 265 265 LightDM. Please use the services.displayManager.autoLogin options 266 266 instead, or any other display manager in NixOS as they all support auto-login. 267 267 '') 268 + (mkRemovedOptionModule [ 269 + "services" 270 + "xserver" 271 + "desktopManager" 272 + "plasma5" 273 + ] "the Plasma 5 desktop environment has been removed from nixpkgs, as it has reached EOL upstream.") 268 274 (mkRemovedOptionModule [ "services" "xserver" "multitouch" ] '' 269 275 services.xserver.multitouch (which uses xf86_input_mtrack) has been removed 270 276 as the underlying package isn't being maintained. Working alternatives are
-1
nixos/modules/services/x11/desktop-managers/default.nix
··· 26 26 ./xterm.nix 27 27 ./phosh.nix 28 28 ./xfce.nix 29 - ./plasma5.nix 30 29 ../../desktop-managers/plasma6.nix 31 30 ./lumina.nix 32 31 ./lxqt.nix
-635
nixos/modules/services/x11/desktop-managers/plasma5.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - utils, 6 - ... 7 - }: 8 - 9 - let 10 - xcfg = config.services.xserver; 11 - cfg = xcfg.desktopManager.plasma5; 12 - 13 - # Use only for **internal** options. 14 - # This is not exactly user-friendly. 15 - kdeConfigurationType = 16 - with types; 17 - let 18 - valueTypes = 19 - (oneOf [ 20 - bool 21 - float 22 - int 23 - str 24 - ]) 25 - // { 26 - description = "KDE Configuration value"; 27 - emptyValue.value = ""; 28 - }; 29 - set = (nullOr (lazyAttrsOf valueTypes)) // { 30 - description = "KDE Configuration set"; 31 - emptyValue.value = { }; 32 - }; 33 - in 34 - (lazyAttrsOf set) 35 - // { 36 - description = "KDE Configuration file"; 37 - emptyValue.value = { }; 38 - }; 39 - 40 - inherit (lib) 41 - getBin 42 - optionalAttrs 43 - literalExpression 44 - mkRemovedOptionModule 45 - mkRenamedOptionModule 46 - mkDefault 47 - mkIf 48 - mkMerge 49 - mkOption 50 - mkPackageOption 51 - types 52 - ; 53 - 54 - activationScript = '' 55 - ${set_XDG_CONFIG_HOME} 56 - 57 - # The KDE icon cache is supposed to update itself automatically, but it uses 58 - # the timestamp on the icon theme directory as a trigger. This doesn't work 59 - # on NixOS because the timestamp never changes. As a workaround, delete the 60 - # icon cache at login and session activation. 61 - # See also: http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html 62 - rm -fv "$HOME"/.cache/icon-cache.kcache 63 - 64 - # xdg-desktop-settings generates this empty file but 65 - # it makes kbuildsyscoca5 fail silently. To fix this 66 - # remove that menu if it exists. 67 - rm -fv "''${XDG_CONFIG_HOME}"/menus/applications-merged/xdg-desktop-menu-dummy.menu 68 - 69 - # Qt writes a weird ‘libraryPath’ line to 70 - # ~/.config/Trolltech.conf that causes the KDE plugin 71 - # paths of previous KDE invocations to be searched. 72 - # Obviously using mismatching KDE libraries is potentially 73 - # disastrous, so here we nuke references to the Nix store 74 - # in Trolltech.conf. A better solution would be to stop 75 - # Qt from doing this wackiness in the first place. 76 - trolltech_conf="''${XDG_CONFIG_HOME}/Trolltech.conf" 77 - if [ -e "$trolltech_conf" ]; then 78 - ${getBin pkgs.gnused}/bin/sed -i "$trolltech_conf" -e '/nix\\store\|nix\/store/ d' 79 - fi 80 - 81 - # Remove the kbuildsyscoca5 cache. It will be regenerated 82 - # immediately after. This is necessary for kbuildsyscoca5 to 83 - # recognize that software that has been removed. 84 - rm -fv "$HOME"/.cache/ksycoca* 85 - 86 - ${pkgs.plasma5Packages.kservice}/bin/kbuildsycoca5 87 - ''; 88 - 89 - set_XDG_CONFIG_HOME = '' 90 - # Set the default XDG_CONFIG_HOME if it is unset. 91 - # Per the XDG Base Directory Specification: 92 - # https://specifications.freedesktop.org/basedir-spec/latest 93 - # 1. Never export this variable! If it is unset, then child processes are 94 - # expected to set the default themselves. 95 - # 2. Contaminate / if $HOME is unset; do not check if $HOME is set. 96 - XDG_CONFIG_HOME=''${XDG_CONFIG_HOME:-$HOME/.config} 97 - ''; 98 - 99 - in 100 - 101 - { 102 - options = { 103 - services.xserver.desktopManager.plasma5 = { 104 - enable = mkOption { 105 - type = types.bool; 106 - default = false; 107 - description = "Enable the Plasma 5 (KDE 5) desktop environment."; 108 - }; 109 - 110 - phononBackend = mkOption { 111 - type = types.enum [ 112 - "gstreamer" 113 - "vlc" 114 - ]; 115 - default = "vlc"; 116 - example = "gstreamer"; 117 - description = "Phonon audio backend to install."; 118 - }; 119 - 120 - useQtScaling = mkOption { 121 - type = types.bool; 122 - default = false; 123 - description = "Enable HiDPI scaling in Qt."; 124 - }; 125 - 126 - runUsingSystemd = mkOption { 127 - description = "Use systemd to manage the Plasma session"; 128 - type = types.bool; 129 - default = true; 130 - }; 131 - 132 - notoPackage = mkPackageOption pkgs "Noto fonts" { 133 - default = [ "noto-fonts" ]; 134 - example = "noto-fonts-lgc-plus"; 135 - }; 136 - 137 - # Internally allows configuring kdeglobals globally 138 - kdeglobals = mkOption { 139 - internal = true; 140 - default = { }; 141 - type = kdeConfigurationType; 142 - }; 143 - 144 - # Internally allows configuring kwin globally 145 - kwinrc = mkOption { 146 - internal = true; 147 - default = { }; 148 - type = kdeConfigurationType; 149 - }; 150 - 151 - mobile.enable = mkOption { 152 - type = types.bool; 153 - default = false; 154 - description = '' 155 - Enable support for running the Plasma Mobile shell. 156 - ''; 157 - }; 158 - 159 - mobile.installRecommendedSoftware = mkOption { 160 - type = types.bool; 161 - default = true; 162 - description = '' 163 - Installs software recommended for use with Plasma Mobile, but which 164 - is not strictly required for Plasma Mobile to run. 165 - ''; 166 - }; 167 - 168 - bigscreen.enable = mkOption { 169 - type = types.bool; 170 - default = false; 171 - description = '' 172 - Enable support for running the Plasma Bigscreen session. 173 - ''; 174 - }; 175 - }; 176 - environment.plasma5.excludePackages = mkOption { 177 - description = "List of default packages to exclude from the configuration"; 178 - type = types.listOf types.package; 179 - default = [ ]; 180 - example = literalExpression "[ pkgs.plasma5Packages.oxygen ]"; 181 - }; 182 - }; 183 - 184 - imports = [ 185 - (mkRemovedOptionModule [ 186 - "services" 187 - "xserver" 188 - "desktopManager" 189 - "plasma5" 190 - "enableQt4Support" 191 - ] "Phonon no longer supports Qt 4.") 192 - (mkRemovedOptionModule [ 193 - "services" 194 - "xserver" 195 - "desktopManager" 196 - "plasma5" 197 - "supportDDC" 198 - ] "DDC/CI is no longer supported upstream.") 199 - (mkRenamedOptionModule 200 - [ "services" "xserver" "desktopManager" "kde5" ] 201 - [ "services" "xserver" "desktopManager" "plasma5" ] 202 - ) 203 - (mkRenamedOptionModule 204 - [ "services" "xserver" "desktopManager" "plasma5" "excludePackages" ] 205 - [ "environment" "plasma5" "excludePackages" ] 206 - ) 207 - ]; 208 - 209 - config = mkMerge [ 210 - # Common Plasma dependencies 211 - (mkIf (cfg.enable || cfg.mobile.enable || cfg.bigscreen.enable) { 212 - warnings = [ 213 - "Plasma 5 has been deprecated and will be removed in NixOS 25.11. Please migrate your configuration to Plasma 6." 214 - ]; 215 - 216 - security.wrappers = { 217 - kwin_wayland = { 218 - owner = "root"; 219 - group = "root"; 220 - capabilities = "cap_sys_nice+ep"; 221 - source = "${getBin pkgs.plasma5Packages.kwin}/bin/kwin_wayland"; 222 - }; 223 - } 224 - // optionalAttrs (!cfg.runUsingSystemd) { 225 - start_kdeinit = { 226 - setuid = true; 227 - owner = "root"; 228 - group = "root"; 229 - source = "${getBin pkgs.plasma5Packages.kinit}/libexec/kf5/start_kdeinit"; 230 - }; 231 - }; 232 - 233 - qt.enable = true; 234 - 235 - environment.systemPackages = 236 - with pkgs.plasma5Packages; 237 - let 238 - requiredPackages = [ 239 - frameworkintegration 240 - kactivities 241 - kauth 242 - kcmutils 243 - kconfig 244 - kconfigwidgets 245 - kcoreaddons 246 - kdoctools 247 - kdbusaddons 248 - kdeclarative 249 - kded 250 - kdesu 251 - kdnssd 252 - kemoticons 253 - kfilemetadata 254 - kglobalaccel 255 - kguiaddons 256 - kiconthemes 257 - kidletime 258 - kimageformats 259 - kinit 260 - kirigami2 # In system profile for SDDM theme. TODO: wrapper. 261 - kio 262 - kjobwidgets 263 - knewstuff 264 - knotifications 265 - knotifyconfig 266 - kpackage 267 - kparts 268 - kpeople 269 - krunner 270 - kservice 271 - ktextwidgets 272 - kwallet 273 - kwallet-pam 274 - kwalletmanager 275 - kwayland 276 - kwayland-integration 277 - kwidgetsaddons 278 - kxmlgui 279 - kxmlrpcclient 280 - plasma-framework 281 - solid 282 - sonnet 283 - threadweaver 284 - 285 - breeze-qt5 286 - kactivitymanagerd 287 - kde-cli-tools 288 - kdecoration 289 - kdeplasma-addons 290 - kgamma5 291 - khotkeys 292 - kscreen 293 - kscreenlocker 294 - kwayland 295 - kwin 296 - kwrited 297 - libkscreen 298 - libksysguard 299 - milou 300 - plasma-integration 301 - polkit-kde-agent 302 - 303 - qqc2-breeze-style 304 - qqc2-desktop-style 305 - 306 - plasma-desktop 307 - plasma-workspace 308 - plasma-workspace-wallpapers 309 - 310 - oxygen-sounds 311 - 312 - breeze-icons 313 - pkgs.hicolor-icon-theme 314 - 315 - kde-gtk-config 316 - breeze-gtk 317 - 318 - qtvirtualkeyboard 319 - 320 - pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ 321 - ]; 322 - optionalPackages = [ 323 - pkgs.aha # needed by kinfocenter for fwupd support 324 - plasma-browser-integration 325 - konsole 326 - oxygen 327 - (lib.getBin qttools) # Expose qdbus in PATH 328 - ]; 329 - in 330 - requiredPackages 331 - ++ utils.removePackagesByName optionalPackages config.environment.plasma5.excludePackages 332 - 333 - # Phonon audio backend 334 - ++ lib.optional (cfg.phononBackend == "gstreamer") pkgs.plasma5Packages.phonon-backend-gstreamer 335 - ++ lib.optional (cfg.phononBackend == "vlc") pkgs.plasma5Packages.phonon-backend-vlc 336 - 337 - # Optional hardware support features 338 - ++ lib.optionals config.hardware.bluetooth.enable [ 339 - bluedevil 340 - bluez-qt 341 - pkgs.openobex 342 - pkgs.obexftp 343 - ] 344 - ++ lib.optional config.networking.networkmanager.enable plasma-nm 345 - ++ lib.optional config.services.pulseaudio.enable plasma-pa 346 - ++ lib.optional config.services.pipewire.pulse.enable plasma-pa 347 - ++ lib.optional config.powerManagement.enable powerdevil 348 - ++ lib.optional config.services.colord.enable pkgs.colord-kde 349 - ++ lib.optional config.services.hardware.bolt.enable pkgs.plasma5Packages.plasma-thunderbolt 350 - ++ lib.optional config.services.samba.enable kdenetwork-filesharing 351 - ++ lib.optional config.services.xserver.wacom.enable pkgs.wacomtablet 352 - ++ lib.optional config.services.flatpak.enable flatpak-kcm; 353 - 354 - # Extra services for D-Bus activation 355 - services.dbus.packages = [ 356 - pkgs.plasma5Packages.kactivitymanagerd 357 - ]; 358 - 359 - environment.pathsToLink = [ 360 - # FIXME: modules should link subdirs of `/share` rather than relying on this 361 - "/share" 362 - ]; 363 - 364 - environment.etc."X11/xkb".source = xcfg.xkb.dir; 365 - 366 - environment.sessionVariables = { 367 - PLASMA_USE_QT_SCALING = mkIf cfg.useQtScaling "1"; 368 - 369 - # Needed for things that depend on other store.kde.org packages to install correctly, 370 - # notably Plasma look-and-feel packages (a.k.a. Global Themes) 371 - # 372 - # FIXME: this is annoyingly impure and should really be fixed at source level somehow, 373 - # but kpackage is a library so we can't just wrap the one thing invoking it and be done. 374 - # This also means things won't work for people not on Plasma, but at least this way it 375 - # works for SOME people. 376 - KPACKAGE_DEP_RESOLVERS_PATH = "${pkgs.plasma5Packages.frameworkintegration.out}/libexec/kf5/kpackagehandlers"; 377 - }; 378 - 379 - # Enable GTK applications to load SVG icons 380 - programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; 381 - 382 - fonts.packages = with pkgs; [ 383 - cfg.notoPackage 384 - hack-font 385 - ]; 386 - fonts.fontconfig.defaultFonts = { 387 - monospace = [ 388 - "Hack" 389 - "Noto Sans Mono" 390 - ]; 391 - sansSerif = [ "Noto Sans" ]; 392 - serif = [ "Noto Serif" ]; 393 - }; 394 - 395 - programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt; 396 - programs.ssh.askPassword = mkDefault "${pkgs.plasma5Packages.ksshaskpass.out}/bin/ksshaskpass"; 397 - 398 - # Enable helpful DBus services. 399 - services.accounts-daemon.enable = true; 400 - programs.dconf.enable = true; 401 - # when changing an account picture the accounts-daemon reads a temporary file containing the image which systemsettings5 may place under /tmp 402 - systemd.services.accounts-daemon.serviceConfig.PrivateTmp = false; 403 - services.power-profiles-daemon.enable = mkDefault true; 404 - services.system-config-printer.enable = mkIf config.services.printing.enable (mkDefault true); 405 - services.udisks2.enable = true; 406 - services.upower.enable = config.powerManagement.enable; 407 - services.libinput.enable = mkDefault true; 408 - 409 - # Extra UDEV rules used by Solid 410 - services.udev.packages = [ 411 - # libmtp has "bin", "dev", "out" outputs. UDEV rules file is in "out". 412 - pkgs.libmtp.out 413 - pkgs.media-player-info 414 - ]; 415 - 416 - # Enable screen reader by default 417 - services.orca.enable = mkDefault true; 418 - 419 - services.displayManager.sddm = { 420 - theme = mkDefault "breeze"; 421 - }; 422 - 423 - security.pam.services.kde = { 424 - allowNullPassword = true; 425 - }; 426 - 427 - security.pam.services.login.kwallet.enable = true; 428 - 429 - systemd.user.services = { 430 - plasma-early-setup = mkIf cfg.runUsingSystemd { 431 - description = "Early Plasma setup"; 432 - wantedBy = [ "graphical-session-pre.target" ]; 433 - serviceConfig.Type = "oneshot"; 434 - script = activationScript; 435 - }; 436 - }; 437 - 438 - xdg.icons.enable = true; 439 - 440 - xdg.portal.enable = true; 441 - xdg.portal.extraPortals = [ pkgs.plasma5Packages.xdg-desktop-portal-kde ]; 442 - xdg.portal.configPackages = mkDefault [ pkgs.plasma5Packages.xdg-desktop-portal-kde ]; 443 - # xdg-desktop-portal-kde expects PipeWire to be running. 444 - services.pipewire.enable = mkDefault true; 445 - 446 - # Update the start menu for each user that is currently logged in 447 - system.userActivationScripts.plasmaSetup = activationScript; 448 - 449 - programs.firefox.nativeMessagingHosts.packages = [ 450 - pkgs.plasma5Packages.plasma-browser-integration 451 - ]; 452 - programs.chromium.enablePlasmaBrowserIntegration = true; 453 - }) 454 - 455 - (mkIf (cfg.kwinrc != { }) { 456 - environment.etc."xdg/kwinrc".text = lib.generators.toINI { } cfg.kwinrc; 457 - }) 458 - 459 - (mkIf (cfg.kdeglobals != { }) { 460 - environment.etc."xdg/kdeglobals".text = lib.generators.toINI { } cfg.kdeglobals; 461 - }) 462 - 463 - # Plasma Desktop 464 - (mkIf cfg.enable { 465 - 466 - # Seed our configuration into nixos-generate-config 467 - system.nixos-generate-config.desktopConfiguration = [ 468 - '' 469 - # Enable the Plasma 5 Desktop Environment. 470 - services.displayManager.sddm.enable = true; 471 - services.xserver.desktopManager.plasma5.enable = true; 472 - '' 473 - ]; 474 - 475 - services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ]; 476 - # Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has 477 - # many tiny bugs. 478 - # See: https://github.com/NixOS/nixpkgs/issues/143272 479 - services.displayManager.defaultSession = mkDefault "plasma"; 480 - 481 - environment.systemPackages = 482 - with pkgs.plasma5Packages; 483 - let 484 - requiredPackages = [ 485 - ksystemstats 486 - kinfocenter 487 - kmenuedit 488 - plasma-systemmonitor 489 - spectacle 490 - systemsettings 491 - 492 - dolphin 493 - dolphin-plugins 494 - ffmpegthumbs 495 - kdegraphics-thumbnailers 496 - kde-inotify-survey 497 - kio-admin 498 - kio-extras 499 - ]; 500 - optionalPackages = [ 501 - ark 502 - elisa 503 - gwenview 504 - okular 505 - khelpcenter 506 - print-manager 507 - ]; 508 - in 509 - requiredPackages 510 - ++ utils.removePackagesByName optionalPackages config.environment.plasma5.excludePackages; 511 - 512 - systemd.user.services = { 513 - plasma-run-with-systemd = { 514 - description = "Run KDE Plasma via systemd"; 515 - wantedBy = [ "basic.target" ]; 516 - serviceConfig.Type = "oneshot"; 517 - script = '' 518 - ${set_XDG_CONFIG_HOME} 519 - 520 - ${pkgs.plasma5Packages.kconfig}/bin/kwriteconfig5 \ 521 - --file startkderc --group General --key systemdBoot ${lib.boolToString cfg.runUsingSystemd} 522 - ''; 523 - }; 524 - }; 525 - }) 526 - 527 - # Plasma Mobile 528 - (mkIf cfg.mobile.enable { 529 - assertions = [ 530 - { 531 - # The user interface breaks without NetworkManager 532 - assertion = config.networking.networkmanager.enable; 533 - message = "Plasma Mobile requires NetworkManager."; 534 - } 535 - { 536 - # The user interface breaks without bluetooth 537 - assertion = config.hardware.bluetooth.enable; 538 - message = "Plasma Mobile requires Bluetooth."; 539 - } 540 - { 541 - # The user interface breaks without pulse 542 - assertion = 543 - config.services.pulseaudio.enable 544 - || (config.services.pipewire.enable && config.services.pipewire.pulse.enable); 545 - message = "Plasma Mobile requires a Pulseaudio compatible sound server."; 546 - } 547 - ]; 548 - 549 - environment.systemPackages = 550 - with pkgs.plasma5Packages; 551 - [ 552 - # Basic packages without which Plasma Mobile fails to work properly. 553 - plasma-mobile 554 - plasma-nano 555 - pkgs.maliit-framework 556 - pkgs.maliit-keyboard 557 - ] 558 - ++ lib.optionals (cfg.mobile.installRecommendedSoftware) ( 559 - with pkgs.plasma5Packages.plasmaMobileGear; 560 - [ 561 - # Additional software made for Plasma Mobile. 562 - alligator 563 - angelfish 564 - audiotube 565 - calindori 566 - kalk 567 - kasts 568 - kclock 569 - keysmith 570 - koko 571 - krecorder 572 - ktrip 573 - kweather 574 - plasma-dialer 575 - plasma-phonebook 576 - plasma-settings 577 - spacebar 578 - ] 579 - ); 580 - 581 - # The following services are needed or the UI is broken. 582 - hardware.bluetooth.enable = true; 583 - networking.networkmanager.enable = true; 584 - # Required for autorotate 585 - hardware.sensor.iio.enable = lib.mkDefault true; 586 - 587 - # Recommendations can be found here: 588 - # - https://invent.kde.org/plasma-mobile/plasma-phone-settings/-/tree/master/etc/xdg 589 - # This configuration is the minimum required for Plasma Mobile to *work*. 590 - services.xserver.desktopManager.plasma5 = { 591 - kdeglobals = { 592 - KDE = { 593 - # This forces a numeric PIN for the lockscreen, which is the 594 - # recommendation from upstream. 595 - LookAndFeelPackage = lib.mkDefault "org.kde.plasma.phone"; 596 - }; 597 - }; 598 - kwinrc = { 599 - "Wayland" = { 600 - "InputMethod[$e]" = "/run/current-system/sw/share/applications/com.github.maliit.keyboard.desktop"; 601 - "VirtualKeyboardEnabled" = "true"; 602 - }; 603 - "org.kde.kdecoration2" = { 604 - # No decorations (title bar) 605 - NoPlugin = lib.mkDefault "true"; 606 - }; 607 - }; 608 - }; 609 - 610 - services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ]; 611 - }) 612 - 613 - # Plasma Bigscreen 614 - (mkIf cfg.bigscreen.enable { 615 - environment.systemPackages = with pkgs.plasma5Packages; [ 616 - plasma-nano 617 - plasma-settings 618 - plasma-bigscreen 619 - plasma-remotecontrollers 620 - 621 - aura-browser 622 - plank-player 623 - 624 - plasma-pa 625 - plasma-nm 626 - kdeconnect-kde 627 - ]; 628 - 629 - services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ]; 630 - 631 - # required for plasma-remotecontrollers to work correctly 632 - hardware.uinput.enable = true; 633 - }) 634 - ]; 635 - }
-2
nixos/tests/all-tests.nix
··· 1189 1189 pinnwand = runTest ./pinnwand.nix; 1190 1190 plantuml-server = runTest ./plantuml-server.nix; 1191 1191 plasma-bigscreen = runTest ./plasma-bigscreen.nix; 1192 - plasma5 = runTest ./plasma5.nix; 1193 1192 plasma6 = runTest ./plasma6.nix; 1194 - plasma5-systemd-start = runTest ./plasma5-systemd-start.nix; 1195 1193 plausible = runTest ./plausible.nix; 1196 1194 playwright-python = runTest ./playwright-python.nix; 1197 1195 please = runTest ./please.nix;
-41
nixos/tests/plasma-bigscreen.nix
··· 1 - { pkgs, ... }: 2 - 3 - { 4 - name = "plasma-bigscreen"; 5 - meta = with pkgs.lib.maintainers; { 6 - maintainers = [ 7 - ttuegel 8 - k900 9 - ]; 10 - }; 11 - 12 - nodes.machine = 13 - { ... }: 14 - 15 - { 16 - imports = [ ./common/user-account.nix ]; 17 - services.xserver.enable = true; 18 - services.displayManager.sddm.enable = true; 19 - services.displayManager.defaultSession = "plasma-bigscreen-x11"; 20 - services.xserver.desktopManager.plasma5.bigscreen.enable = true; 21 - services.displayManager.autoLogin = { 22 - enable = true; 23 - user = "alice"; 24 - }; 25 - 26 - users.users.alice.extraGroups = [ "uinput" ]; 27 - }; 28 - 29 - testScript = 30 - { nodes, ... }: 31 - '' 32 - with subtest("Wait for login"): 33 - start_all() 34 - machine.wait_for_file("/tmp/xauth_*") 35 - machine.succeed("xauth merge /tmp/xauth_*") 36 - 37 - with subtest("Check plasmashell started"): 38 - machine.wait_until_succeeds("pgrep plasmashell") 39 - machine.wait_for_window("Plasma Big Screen") 40 - ''; 41 - }
-46
nixos/tests/plasma5-systemd-start.nix
··· 1 - { pkgs, ... }: 2 - 3 - { 4 - name = "plasma5-systemd-start"; 5 - meta = with pkgs.lib.maintainers; { 6 - maintainers = [ oxalica ]; 7 - }; 8 - 9 - nodes.machine = 10 - { ... }: 11 - 12 - { 13 - imports = [ ./common/user-account.nix ]; 14 - services.xserver = { 15 - enable = true; 16 - desktopManager.plasma5.enable = true; 17 - desktopManager.plasma5.runUsingSystemd = true; 18 - }; 19 - 20 - services.displayManager = { 21 - sddm.enable = true; 22 - defaultSession = "plasma"; 23 - autoLogin = { 24 - enable = true; 25 - user = "alice"; 26 - }; 27 - }; 28 - }; 29 - 30 - testScript = 31 - { nodes, ... }: 32 - '' 33 - with subtest("Wait for login"): 34 - start_all() 35 - machine.wait_for_file("/tmp/xauth_*") 36 - machine.succeed("xauth merge /tmp/xauth_*") 37 - 38 - with subtest("Check plasmashell started"): 39 - machine.wait_until_succeeds("pgrep plasmashell") 40 - machine.wait_for_window("^Desktop ") 41 - 42 - status, result = machine.systemctl('--no-pager show plasma-plasmashell.service', user='alice') 43 - assert status == 0, 'Service not found' 44 - assert 'ActiveState=active' in result.split('\n'), 'Systemd service not active' 45 - ''; 46 - }
-70
nixos/tests/plasma5.nix
··· 1 - { pkgs, ... }: 2 - 3 - { 4 - name = "plasma5"; 5 - meta = with pkgs.lib.maintainers; { 6 - maintainers = [ ttuegel ]; 7 - }; 8 - 9 - nodes.machine = 10 - { ... }: 11 - 12 - { 13 - imports = [ ./common/user-account.nix ]; 14 - services.xserver.enable = true; 15 - services.displayManager.sddm.enable = true; 16 - services.displayManager.defaultSession = "plasma"; 17 - services.xserver.desktopManager.plasma5.enable = true; 18 - environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ]; 19 - services.displayManager.autoLogin = { 20 - enable = true; 21 - user = "alice"; 22 - }; 23 - }; 24 - 25 - testScript = 26 - { nodes, ... }: 27 - let 28 - user = nodes.machine.users.users.alice; 29 - xdo = "${pkgs.xdotool}/bin/xdotool"; 30 - in 31 - '' 32 - with subtest("Wait for login"): 33 - start_all() 34 - machine.wait_for_file("/tmp/xauth_*") 35 - machine.succeed("xauth merge /tmp/xauth_*") 36 - 37 - with subtest("Check plasmashell started"): 38 - machine.wait_until_succeeds("pgrep plasmashell") 39 - machine.wait_for_window("^Desktop ") 40 - 41 - with subtest("Check that KDED is running"): 42 - machine.succeed("pgrep kded5") 43 - 44 - with subtest("Check that logging in has given the user ownership of devices"): 45 - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 46 - 47 - with subtest("Ensure Elisa is not installed"): 48 - machine.fail("which elisa") 49 - 50 - machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'") 51 - 52 - with subtest("Run Dolphin"): 53 - machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'") 54 - machine.wait_for_window(" Dolphin") 55 - 56 - with subtest("Run Konsole"): 57 - machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole >&2 &'") 58 - machine.wait_for_window("Konsole") 59 - 60 - with subtest("Run systemsettings"): 61 - machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings5 >&2 &'") 62 - machine.wait_for_window("Settings") 63 - 64 - with subtest("Wait to get a screenshot"): 65 - machine.execute( 66 - "${xdo} key Alt+F1 sleep 10" 67 - ) 68 - machine.screenshot("screen") 69 - ''; 70 - }