Initial commit.
This commit is contained in:
commit
67823cbed6
51 changed files with 1714 additions and 0 deletions
41
espeakup.nix
Normal file
41
espeakup.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.espeakup;
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkPackageOption
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.services.espeakup = {
|
||||
enable = mkEnableOption "Espeakup screen reader";
|
||||
package = mkPackageOption pkgs "espeakup" { };
|
||||
defaultVoice = mkOption {
|
||||
type = types.str;
|
||||
default = "en-gb";
|
||||
description = "Default voice for espeakup";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.kernelModules = [ "speakup_soft" ];
|
||||
systemd.packages = [ pkgs.espeakup ];
|
||||
systemd.services.espeakup = {
|
||||
wantedBy = [ "sound.target" ];
|
||||
environment = {
|
||||
default_voice = cfg.defaultVoice;
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStartPre = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue