diff options
author | Arseniy Seroka <jagajaga@users.noreply.github.com> | 2015-09-11 19:13:58 +0300 |
---|---|---|
committer | Arseniy Seroka <jagajaga@users.noreply.github.com> | 2015-09-11 19:13:58 +0300 |
commit | cb90dbfafebc76fb792a9195b2748fda1a902c63 (patch) | |
tree | 2753a2f3a8b9f8c8c935f1cd1594fbd5d55a7ba5 /nixos | |
parent | 8b0aa65c6770ff01999804e72ce55f03c5dcf898 (diff) | |
parent | 18acb80b82a3609637e90fbc071b569a999c9b8a (diff) | |
download | nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar.gz nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar.bz2 nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar.lz nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar.xz nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.tar.zst nixlib-cb90dbfafebc76fb792a9195b2748fda1a902c63.zip |
Merge pull request #9745 from bramd/brltty
Brltty
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/hardware/brltty.nix | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/nixos/modules/services/hardware/brltty.nix b/nixos/modules/services/hardware/brltty.nix index d6c05a3d620c..03e530b2c96d 100644 --- a/nixos/modules/services/hardware/brltty.nix +++ b/nixos/modules/services/hardware/brltty.nix @@ -4,10 +4,6 @@ with lib; let cfg = config.services.brltty; - - stateDir = "/run/brltty"; - - pidFile = "${stateDir}/brltty.pid"; in { @@ -24,14 +20,24 @@ in { config = mkIf cfg.enable { systemd.services.brltty = { - description = "Braille console driver"; - preStart = '' - mkdir -p ${stateDir} - ''; + description = "Braille Device Support"; + unitConfig = { + Documentation = "http://mielke.cc/brltty/"; + DefaultDependencies = "no"; + RequiresMountsFor = "${pkgs.brltty}/var/lib/brltty"; + }; serviceConfig = { - ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}"; - Type = "forking"; - PIDFile = pidFile; + ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon"; + Type = "simple"; # Change to notidy after next releae + TimeoutStartSec = 5; + TimeoutStopSec = 10; + Restart = "always"; + RestartSec = 30; + Nice = -10; + OOMScoreAdjust = -900; + ProtectHome = "read-only"; + ProtectSystem = "full"; + SystemCallArchitectures = "native"; }; before = [ "sysinit.target" ]; wantedBy = [ "sysinit.target" ]; |