1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-27 13:29:43 +01:00
nixos-hardware/microsoft/surface/common/ipts/default.nix

28 lines
570 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
inherit (lib) mkDefault mkEnableOption mkIf mkMerge;
cfg = config.microsoft-surface.ipts;
in {
options.microsoft-surface.ipts = {
enable = mkEnableOption "Enable IPTSd for Microsoft Surface";
};
config = mkMerge [
{
microsoft-surface.ipts.enable = mkDefault false;
}
(mkIf cfg.enable {
systemd.services.iptsd = {
description = "IPTSD";
path = with pkgs; [ iptsd ];
2023-06-20 16:49:07 +02:00
script = "iptsd $(iptsd-find-hidraw)";
wantedBy = [ "multi-user.target" ];
};
})
];
}