nixos/iptsd: init
This commit is contained in:
parent
e89936d319
commit
04b6bd2def
2 changed files with 54 additions and 0 deletions
|
@ -516,6 +516,7 @@
|
|||
./services/hardware/hddfancontrol.nix
|
||||
./services/hardware/illum.nix
|
||||
./services/hardware/interception-tools.nix
|
||||
./services/hardware/iptsd.nix
|
||||
./services/hardware/irqbalance.nix
|
||||
./services/hardware/joycond.nix
|
||||
./services/hardware/kanata.nix
|
||||
|
|
53
nixos/modules/services/hardware/iptsd.nix
Normal file
53
nixos/modules/services/hardware/iptsd.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.iptsd;
|
||||
format = pkgs.formats.ini { };
|
||||
configFile = format.generate "iptsd.conf" cfg.config;
|
||||
in {
|
||||
options.services.iptsd = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "the userspace daemon for Intel Precise Touch & Stylus");
|
||||
|
||||
config = lib.mkOption {
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
Configuration for IPTSD. See the
|
||||
[reference configuration](https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf)
|
||||
for available options and defaults.
|
||||
'';
|
||||
type = lib.types.submodule {
|
||||
freeformType = format.type;
|
||||
options = {
|
||||
Touch = {
|
||||
DisableOnPalm = lib.mkOption {
|
||||
default = false;
|
||||
description = lib.mdDoc "Ignore all touch inputs if a palm was registered on the display.";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
DisableOnStylus = lib.mkOption {
|
||||
default = false;
|
||||
description = lib.mdDoc "Ignore all touch inputs if a stylus is in proximity.";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
Stylus = {
|
||||
Disable = lib.mkOption {
|
||||
default = false;
|
||||
description = lib.mdDoc "Disables the stylus. No stylus data will be processed.";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.packages = [ pkgs.iptsd ];
|
||||
environment.etc."iptsd.conf".source = configFile;
|
||||
systemd.services."iptsd@".restartTriggers = [ configFile ];
|
||||
services.udev.packages = [ pkgs.iptsd ];
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ dotlambda ];
|
||||
}
|
Loading…
Reference in a new issue