diff options
author | Bram Duvigneau <bram@bramd.nl> | 2015-09-09 11:51:22 +0200 |
---|---|---|
committer | Bram Duvigneau <bram@bramd.nl> | 2015-09-09 22:40:12 +0200 |
commit | 18acb80b82a3609637e90fbc071b569a999c9b8a (patch) | |
tree | f59373d9f1fb4f8d08b050efc1786278a2761431 /nixos/modules/services/hardware/brltty.nix | |
parent | ee8359868831991f6cf3ca62d950d731c66796db (diff) | |
download | nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar.gz nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar.bz2 nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar.lz nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar.xz nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.tar.zst nixlib-18acb80b82a3609637e90fbc071b569a999c9b8a.zip |
Brltty service: simplified systemd service definition, now it matches
the variant that has been developed upstream. Now the BRLTTY service comes up reliably on boot.
Diffstat (limited to 'nixos/modules/services/hardware/brltty.nix')
-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" ]; |