1 { config, lib, pkgs, ... }:
6 cfg = config.programs.weylus;
9 options.programs.weylus = with types; {
10 enable = mkEnableOption (lib.mdDoc "weylus");
12 openFirewall = mkOption {
15 description = lib.mdDoc ''
16 Open ports needed for the functionality of the program.
23 description = lib.mdDoc ''
24 To enable stylus and multi-touch support, the user you're going to use must be added to this list.
25 These users can synthesize input events system-wide, even when another user is logged in - untrusted users should not be added.
31 default = pkgs.weylus;
32 defaultText = "pkgs.weylus";
33 description = lib.mdDoc "Weylus package to install.";
36 config = mkIf cfg.enable {
37 networking.firewall = mkIf cfg.openFirewall {
38 allowedTCPPorts = [ 1701 9001 ];
41 hardware.uinput.enable = true;
43 users.groups.uinput.members = cfg.users;
45 environment.systemPackages = [ cfg.package ];