nixosTests.kmscon: init (#483223)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
'';
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user