nixos/test/systemd-localed: services.xserver.xkb.layout should be respected

This commit is contained in:
Stefan Haan
2026-07-11 15:45:08 +02:00
parent b6f61c45b1
commit 5d9a7fbe7f
2 changed files with 24 additions and 0 deletions
+1
View File
@@ -1684,6 +1684,7 @@ in
systemd-journal = runTest ./systemd-journal.nix;
systemd-journal-gateway = runTest ./systemd-journal-gateway.nix;
systemd-journal-upload = runTest ./systemd-journal-upload.nix;
systemd-localed = runTest ./systemd-localed.nix;
systemd-lock-handler = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./systemd-lock-handler.nix;
systemd-machinectl = runTest ./systemd-machinectl.nix;
systemd-misc = runTest ./systemd-misc.nix;
+23
View File
@@ -0,0 +1,23 @@
{ lib, ... }:
{
name = "systemd-localed";
meta.maintainers = [ lib.maintainers.haansn08 ];
nodes.machine = { ... }: {
# we don't use services.xserver.enable because some window managers like
# niri rely on systemd-localed for the keyboard layout:
# https://niri-wm.github.io/niri/Configuration%3A-Input.html#layout
services.graphical-desktop.enable = true;
services.xserver.xkb.layout = "jp";
};
testScript = ''
machine.start()
machine.wait_for_unit("default.target")
machine.wait_for_unit("dbus.socket")
status, stdout = machine.execute("localectl")
t.assertIn("X11 Layout: jp", stdout)
'';
}