summary refs log tree commit diff
path: root/nixos/modules/services/hardware/xow.nix
blob: 311181176bd83a5be33084f9571e0bc69f7c5ce8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, pkgs, lib, ... }:

let
  cfg = config.services.hardware.xow;
in {
  options.services.hardware.xow = {
    enable = lib.mkEnableOption "xow as a systemd service";
  };

  config = lib.mkIf cfg.enable {
    hardware.uinput.enable = true;

    boot.extraModprobeConfig = lib.readFile "${pkgs.xow}/lib/modprobe.d/xow-blacklist.conf";

    systemd.packages = [ pkgs.xow ];
    systemd.services.xow.wantedBy = [ "multi-user.target" ];

    services.udev.packages = [ pkgs.xow ];
  };
}