nixos/plasma5: add very basic plasma-bigscreen module

This commit is contained in:
K900 2022-09-17 16:02:37 +03:00
parent 7e99c2ed5b
commit 5e62c78f4b
3 changed files with 68 additions and 1 deletions

View File

@ -228,6 +228,14 @@ in
is not strictly required for Plasma Mobile to run.
'';
};
bigscreen.enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Enable support for running the Plasma Bigscreen session.
'';
};
};
imports = [
@ -237,7 +245,7 @@ in
config = mkMerge [
# Common Plasma dependencies
(mkIf (cfg.enable || cfg.mobile.enable) {
(mkIf (cfg.enable || cfg.mobile.enable || cfg.bigscreen.enable) {
security.wrappers = {
kscreenlocker_greet = {
@ -595,5 +603,27 @@ in
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-mobile ];
})
# Plasma Bigscreen
(mkIf cfg.bigscreen.enable {
environment.systemPackages =
with pkgs.plasma5Packages;
[
plasma-nano
plasma-settings
plasma-bigscreen
plasma-remotecontrollers
aura-browser
plank-player
plasma-pa
plasma-nm
kdeconnect-kde
];
services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ];
services.udev.packages = [ pkgs.plasma5Packages.plasma-remotecontrollers ];
})
];
}

View File

@ -486,6 +486,7 @@ in {
phylactery = handleTest ./web-apps/phylactery.nix {};
pict-rs = handleTest ./pict-rs.nix {};
pinnwand = handleTest ./pinnwand.nix {};
plasma-bigscreen = handleTest ./plasma-bigscreen.nix {};
plasma5 = handleTest ./plasma5.nix {};
plasma5-systemd-start = handleTest ./plasma5-systemd-start.nix {};
plausible = handleTest ./plausible.nix {};

View File

@ -0,0 +1,36 @@
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "plasma-bigscreen";
meta = with pkgs.lib.maintainers; {
maintainers = [ ttuegel k900 ];
};
nodes.machine = { ... }:
{
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.defaultSession = "plasma-bigscreen-x11";
services.xserver.desktopManager.plasma5.bigscreen.enable = true;
services.xserver.displayManager.autoLogin = {
enable = true;
user = "alice";
};
};
testScript = { nodes, ... }: let
user = nodes.machine.users.users.alice;
xdo = "${pkgs.xdotool}/bin/xdotool";
in ''
with subtest("Wait for login"):
start_all()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell")
machine.wait_for_window("Plasma Big Screen")
'';
})