diff options
author | K900 <me@0upti.me> | 2022-09-17 16:02:37 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2022-10-12 17:15:56 +0300 |
commit | 5e62c78f4b565f98b798046c9285f5c0d663695f (patch) | |
tree | 1d4af5ec90095122fbf394517ea662a2689d26d1 | |
parent | 7e99c2ed5bf1bbb5752a6ebabeed65bd05e7cb71 (diff) | |
download | nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar.gz nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar.bz2 nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar.lz nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar.xz nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.tar.zst nixpkgs-5e62c78f4b565f98b798046c9285f5c0d663695f.zip |
nixos/plasma5: add very basic plasma-bigscreen module
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/plasma5.nix | 32 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/plasma-bigscreen.nix | 36 |
3 files changed, 68 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 3e04f6d0e6b..aa1359bf358 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -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 ]; + }) ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3b697139dc8..47a433c0322 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/plasma-bigscreen.nix b/nixos/tests/plasma-bigscreen.nix new file mode 100644 index 00000000000..ab459b6bffb --- /dev/null +++ b/nixos/tests/plasma-bigscreen.nix @@ -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") + ''; +}) |