git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #9745 from bramd/brltty

Brltty

commitcb90dbfafebc76fb792a9195b2748fda1a902c63 authorArseniy Seroka <jagajaga@users.noreply.github.com> dateFri 11 Sep 2015, 19:13 (11 years ago) parent8b0aa6518acb80
1 file changed+17−11
nixos/modules/services/hardware/brltty.nix+17−11
nixos/modules/services/hardware/brltty.nix+17−11
@@ -4,10 +4,6 @@ with lib;
44
55let
66 cfg = config.services.brltty;
7−
8− stateDir = "/run/brltty";
9−
10− pidFile = "${stateDir}/brltty.pid";
117
128in {
139
@@ -24,14 +20,24 @@ in {
2420 config = mkIf cfg.enable {
2521
2622 systemd.services.brltty = {
27− description = "Braille console driver";
28− preStart = ''
29− mkdir -p ${stateDir}
30− '';
23+ description = "Braille Device Support";
24+ unitConfig = {
25+ Documentation = "http://mielke.cc/brltty/";
26+ DefaultDependencies = "no";
27+ RequiresMountsFor = "${pkgs.brltty}/var/lib/brltty";
28+ };
3129 serviceConfig = {
32− ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}";
33− Type = "forking";
34− PIDFile = pidFile;
30+ ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon";
31+ Type = "simple"; # Change to notidy after next releae
32+ TimeoutStartSec = 5;
33+ TimeoutStopSec = 10;
34+ Restart = "always";
35+ RestartSec = 30;
36+ Nice = -10;
37+ OOMScoreAdjust = -900;
38+ ProtectHome = "read-only";
39+ ProtectSystem = "full";
40+ SystemCallArchitectures = "native";
3541 };
3642 before = [ "sysinit.target" ];
3743 wantedBy = [ "sysinit.target" ];