aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/hardware/brltty.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/hardware/brltty.nix')
-rw-r--r--nixpkgs/nixos/modules/services/hardware/brltty.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/hardware/brltty.nix b/nixpkgs/nixos/modules/services/hardware/brltty.nix
new file mode 100644
index 00000000000..1266e8f81e5
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/hardware/brltty.nix
@@ -0,0 +1,50 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.brltty;
+
+in {
+
+ options = {
+
+ services.brltty.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to enable the BRLTTY daemon.";
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.brltty = {
+ description = "Braille Device Support";
+ unitConfig = {
+ Documentation = "http://mielke.cc/brltty/";
+ DefaultDependencies = "no";
+ RequiresMountsFor = "${pkgs.brltty}/var/lib/brltty";
+ };
+ serviceConfig = {
+ ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon";
+ Type = "notify";
+ TimeoutStartSec = 5;
+ TimeoutStopSec = 10;
+ Restart = "always";
+ RestartSec = 30;
+ Nice = -10;
+ OOMScoreAdjust = -900;
+ ProtectHome = "read-only";
+ ProtectSystem = "full";
+ SystemCallArchitectures = "native";
+ };
+ wants = [ "systemd-udev-settle.service" ];
+ after = [ "local-fs.target" "systemd-udev-settle.service" ];
+ before = [ "sysinit.target" ];
+ wantedBy = [ "sysinit.target" ];
+ };
+
+ };
+
+}