nixosTests.kmscon: init (#483223)

This commit is contained in:
Yohann Boniface
2026-02-06 23:51:07 +00:00
committed by GitHub
3 changed files with 49 additions and 1 deletions
+1
View File
@@ -837,6 +837,7 @@ in
kimai = runTest ./kimai.nix;
kismet = runTest ./kismet.nix;
kmonad = runTest ./kmonad.nix;
kmscon = runTest ./kmscon.nix;
knot = runTest ./knot.nix;
komga = runTest ./komga.nix;
komodo-periphery = runTest ./komodo-periphery.nix;
+43
View File
@@ -0,0 +1,43 @@
{ ... }:
{
name = "kmscon";
nodes.machine =
{
pkgs,
lib,
...
}:
{
imports = [
./common/user-account.nix
];
services.kmscon = {
enable = true;
hwRender = true;
fonts = [
{
name = "JetBrainsMono Nerd Font";
package = pkgs.nerd-fonts.jetbrains-mono;
}
];
package = pkgs.kmscon;
};
};
enableOCR = true;
testScript = ''
machine.succeed(":")
# ^ this create a screen
with subtest("ensure we can open a tty"):
machine.wait_for_text("machine login:")
machine.send_chars("alice\n")
machine.wait_for_text("Password:")
machine.send_chars("foobar\n")
machine.wait_for_text("alice@machine")
machine.screenshot("tty.png")
'';
}
+5 -1
View File
@@ -19,6 +19,7 @@
bash,
buildPackages,
nix-update-script,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "kmscon";
@@ -63,7 +64,10 @@ stdenv.mkDerivation (finalAttrs: {
./sandbox.patch # Generate system units where they should be (nix store) instead of /etc/systemd/system
];
passthru.updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; };
passthru = {
tests.kmscon = nixosTests.kmscon;
updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; };
};
meta = {
description = "KMS/DRM based System Console";