diff options
author | Bram Duvigneau <bram@bramd.nl> | 2015-04-29 23:02:09 +0200 |
---|---|---|
committer | Bram Duvigneau <bram@bramd.nl> | 2015-04-29 23:02:09 +0200 |
commit | 9a535b90238938e38bdb0498e9f2558ace782a4f (patch) | |
tree | 7dacf0ad8ef2c406c84fc1def42b92fad936befb /nixos | |
parent | 06cf9a961371180f88529bdae3e784bc41b39f89 (diff) | |
download | nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar.gz nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar.bz2 nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar.lz nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar.xz nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.tar.zst nixlib-9a535b90238938e38bdb0498e9f2558ace782a4f.zip |
Added BRLTTY package
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/hardware/brltty.nix | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 61cc551f4358..e1af98f0da64 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -152,6 +152,7 @@ ./services/hardware/actkbd.nix ./services/hardware/amd-hybrid-graphics.nix ./services/hardware/bluetooth.nix + ./services/hardware/brltty.nix ./services/hardware/freefall.nix ./services/hardware/nvidia-optimus.nix ./services/hardware/pcscd.nix diff --git a/nixos/modules/services/hardware/brltty.nix b/nixos/modules/services/hardware/brltty.nix new file mode 100644 index 000000000000..d6c05a3d620c --- /dev/null +++ b/nixos/modules/services/hardware/brltty.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.brltty; + + stateDir = "/run/brltty"; + + pidFile = "${stateDir}/brltty.pid"; + +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 console driver"; + preStart = '' + mkdir -p ${stateDir} + ''; + serviceConfig = { + ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}"; + Type = "forking"; + PIDFile = pidFile; + }; + before = [ "sysinit.target" ]; + wantedBy = [ "sysinit.target" ]; + }; + + }; + +} |