2019-12-22 21:10:48 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.hardware.xow;
|
|
|
|
in {
|
|
|
|
options.services.hardware.xow = {
|
2020-03-30 03:05:52 +02:00
|
|
|
enable = lib.mkEnableOption "xow as a systemd service";
|
2019-12-22 21:10:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
hardware.uinput.enable = true;
|
|
|
|
|
2021-02-03 02:40:12 +01:00
|
|
|
boot.extraModprobeConfig = lib.readFile "${pkgs.xow}/lib/modprobe.d/xow-blacklist.conf";
|
|
|
|
|
2020-03-30 03:05:52 +02:00
|
|
|
systemd.packages = [ pkgs.xow ];
|
2021-02-03 02:40:12 +01:00
|
|
|
systemd.services.xow.wantedBy = [ "multi-user.target" ];
|
2019-12-22 21:10:48 +01:00
|
|
|
|
2020-03-30 03:05:52 +02:00
|
|
|
services.udev.packages = [ pkgs.xow ];
|
2019-12-22 21:10:48 +01:00
|
|
|
};
|
|
|
|
}
|