summary refs log tree commit diff
path: root/nixos/tests/plasma5.nix
diff options
context:
space:
mode:
authorBastian Köcher <git@kchr.de>2018-06-21 14:52:54 +0200
committerBastian Köcher <git@kchr.de>2018-06-21 14:52:54 +0200
commit51bafa64716476d2296b3bca30ccef1f5599ab39 (patch)
tree16a4777090542c3c9916f9fac2507aeb97c33297 /nixos/tests/plasma5.nix
parent556f670c15b13aec3ef5e72623adfbb7cdbe57fc (diff)
downloadnixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar.gz
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar.bz2
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar.lz
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar.xz
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.tar.zst
nixlib-51bafa64716476d2296b3bca30ccef1f5599ab39.zip
tests.plasma5: Fixes OCR in sddm by providing a custom theme
The custom theme just sets the old background colour that OCR works
again.
Diffstat (limited to 'nixos/tests/plasma5.nix')
-rw-r--r--nixos/tests/plasma5.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix
index f3bd4c5915b0..14ab2e30cabf 100644
--- a/nixos/tests/plasma5.nix
+++ b/nixos/tests/plasma5.nix
@@ -6,13 +6,28 @@ import ./make-test.nix ({ pkgs, ...} :
     maintainers = [ ttuegel ];
   };
 
-  machine = { lib, ... }: {
+  machine = { lib, ... }:
+  let
+    sddm_theme = pkgs.stdenv.mkDerivation {
+      name = "breeze-ocr-theme";
+      phases = "buildPhase";
+      buildCommand = ''
+        mkdir -p $out/share/sddm/themes/
+        cp -r ${pkgs.plasma-workspace}/share/sddm/themes/breeze $out/share/sddm/themes/breeze-ocr-theme
+        chmod -R +w $out/share/sddm/themes/breeze-ocr-theme
+        printf "[General]\ntype=color\ncolor=#1d99f3\nbackground=\n" > $out/share/sddm/themes/breeze-ocr-theme/theme.conf
+      '';
+    };
+  in
+  {
     imports = [ ./common/user-account.nix ];
     services.xserver.enable = true;
     services.xserver.displayManager.sddm.enable = true;
+    services.xserver.displayManager.sddm.theme = "breeze-ocr-theme";
     services.xserver.desktopManager.plasma5.enable = true;
     services.xserver.desktopManager.default = "plasma5";
     virtualisation.memorySize = 1024;
+    environment.systemPackages = [ sddm_theme ];
 
     # fontconfig-penultimate-0.3.3 -> 0.3.4 broke OCR apparently, but no idea why.
     nixpkgs.config.packageOverrides = superPkgs: {
@@ -30,7 +45,6 @@ import ./make-test.nix ({ pkgs, ...} :
     xdo = "${pkgs.xdotool}/bin/xdotool";
   in ''
     startAll;
-
     # Wait for display manager to start
     $machine->waitForText(qr/${user.description}/);
     $machine->screenshot("sddm");