diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3f19ed548121e..3fdd83895a9f1 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -446,6 +446,7 @@ in { lldap = handleTest ./lldap.nix {}; locate = handleTest ./locate.nix {}; login = handleTest ./login.nix {}; + logiops = handleTest ./logiops.nix {}; logrotate = handleTest ./logrotate.nix {}; loki = handleTest ./loki.nix {}; luks = handleTest ./luks.nix {}; diff --git a/nixos/tests/logiops.nix b/nixos/tests/logiops.nix new file mode 100644 index 0000000000000..5a058fb507a69 --- /dev/null +++ b/nixos/tests/logiops.nix @@ -0,0 +1,56 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "logiops"; + meta = with pkgs.lib.maintainers; { + maintainers = [ ckie ]; + }; + + nodes = { + main = { ... }: { + services.logiops = { + enable = true; + + settings = { + devices = [{ + name = "Wireless Mouse MX Master 3"; + + smartshift = { + on = true; + threshold = 20; + }; + + hiresscroll = { + hires = true; + invert = false; + target = false; + }; + + dpi = 1500; + + buttons = [ + { + cid = "0x53"; + action = { + type = "Keypress"; + keys = [ "KEY_FORWARD" ]; + }; + } + { + cid = "0x56"; + action = { + type = "Keypress"; + keys = [ "KEY_BACK" ]; + }; + } + ]; + }]; + }; + }; + }; + }; + + testScript = '' + start_all() + with subtest("main machine should succeed"): + main.wait_for_unit("logid.service") + ''; +})