@@ -4,10 +4,6 @@ with lib;
6 cfg = config.services.brltty;
6 cfg = config.services.brltty;
8− stateDir = "/run/brltty";
10− pidFile = "${stateDir}/brltty.pid";
@@ -24,14 +20,24 @@ in {
24 config = mkIf cfg.enable {
20 config = mkIf cfg.enable {
26 systemd.services.brltty = {
22 systemd.services.brltty = {
27− description = "Braille console driver";
23+ description = "Braille Device Support";
28− preStart = ''
24+ unitConfig = {
29− mkdir -p ${stateDir}
25+ Documentation = "http://mielke.cc/brltty/";
26+ DefaultDependencies = "no";
27+ RequiresMountsFor = "${pkgs.brltty}/var/lib/brltty";
31 serviceConfig = {
29 serviceConfig = {
32− ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}";
30+ ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon";
33− Type = "forking";
31+ Type = "simple"; # Change to notidy after next releae
34− PIDFile = pidFile;
32+ TimeoutStartSec = 5;
37+ OOMScoreAdjust = -900;
38+ ProtectHome = "read-only";
39+ ProtectSystem = "full";
40+ SystemCallArchitectures = "native";
36 before = [ "sysinit.target" ];
42 before = [ "sysinit.target" ];
37 wantedBy = [ "sysinit.target" ];
43 wantedBy = [ "sysinit.target" ];