1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-20 16:39:31 +03:00

tests/lomiri: nixfmt

This commit is contained in:
OPNA2608 2024-08-04 18:07:49 +02:00
parent 06013bc2c7
commit c384f677ea

View file

@ -1,19 +1,22 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: let import ./make-test-python.nix (
{ pkgs, lib, ... }:
let
# Just to make sure everything is the same, need it for OCR & navigating greeter # Just to make sure everything is the same, need it for OCR & navigating greeter
user = "alice"; user = "alice";
description = "Alice Foobar"; description = "Alice Foobar";
password = "foobar"; password = "foobar";
in { in
{
name = "lomiri"; name = "lomiri";
meta = { meta = {
maintainers = lib.teams.lomiri.members; maintainers = lib.teams.lomiri.members;
}; };
nodes.machine = { config, ... }: { nodes.machine =
imports = [ { config, ... }:
./common/user-account.nix {
]; imports = [ ./common/user-account.nix ];
users.users.${user} = { users.users.${user} = {
inherit description password; inherit description password;
@ -80,7 +83,8 @@ in {
}; };
# Help with OCR # Help with OCR
systemd.tmpfiles.settings = let systemd.tmpfiles.settings =
let
white = "255, 255, 255"; white = "255, 255, 255";
black = "0, 0, 0"; black = "0, 0, 0";
colorSection = color: { colorSection = color: {
@ -88,26 +92,31 @@ in {
Bold = true; Bold = true;
Transparency = false; Transparency = false;
}; };
terminalColors = pkgs.writeText "customized.colorscheme" (lib.generators.toINI {} { terminalColors = pkgs.writeText "customized.colorscheme" (
lib.generators.toINI { } {
Background = colorSection white; Background = colorSection white;
Foreground = colorSection black; Foreground = colorSection black;
Color2 = colorSection black; Color2 = colorSection black;
Color2Intense = colorSection black; Color2Intense = colorSection black;
}); }
terminalConfig = pkgs.writeText "terminal.ubports.conf" (lib.generators.toINI {} { );
terminalConfig = pkgs.writeText "terminal.ubports.conf" (
lib.generators.toINI { } {
General = { General = {
colorScheme = "customized"; colorScheme = "customized";
fontSize = "16"; fontSize = "16";
fontStyle = "Inconsolata"; fontStyle = "Inconsolata";
}; };
}); }
);
confBase = "${config.users.users.${user}.home}/.config"; confBase = "${config.users.users.${user}.home}/.config";
userDirArgs = { userDirArgs = {
mode = "0700"; mode = "0700";
user = user; user = user;
group = "users"; group = "users";
}; };
in { in
{
"10-lomiri-test-setup" = { "10-lomiri-test-setup" = {
"${confBase}".d = userDirArgs; "${confBase}".d = userDirArgs;
"${confBase}/terminal.ubports".d = userDirArgs; "${confBase}/terminal.ubports".d = userDirArgs;
@ -119,7 +128,9 @@ in {
enableOCR = true; enableOCR = true;
testScript = { nodes, ... }: '' testScript =
{ nodes, ... }:
''
def toggle_maximise(): def toggle_maximise():
""" """
Maximise the current window. Maximise the current window.
@ -346,4 +357,5 @@ in {
machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'") machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'") machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
''; '';
}) }
)