nixpkgs/nixos/modules/services/hardware/xow.nix
Jan Solanti 9de9f6062c xow: fix service
Enable service when services.xow.enable is set to true.
Load xow's modprobe blacklist to make sure the dongle isn't captured by the wrong driver.
2021-02-03 16:18:29 +02:00

21 lines
490 B
Nix

{ 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 ];
};
}