mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-26 11:39:44 +01:00
28 lines
549 B
Nix
28 lines
549 B
Nix
|
{ 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 ];
|
||
|
script = "iptsd";
|
||
|
wantedBy = [ "multi-user.target" ];
|
||
|
};
|
||
|
})
|
||
|
];
|
||
|
}
|