Skip to content

Commit

Permalink
nixos/speechd: init
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Jul 26, 2024
1 parent 8e7a098 commit 04d010a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
./security/systemd-confinement.nix
./security/tpm2.nix
./security/wrappers/default.nix
./services/accessibility/speechd.nix
./services/admin/docuum.nix
./services/admin/meshcentral.nix
./services/admin/oxidized.nix
Expand Down
33 changes: 33 additions & 0 deletions nixos/modules/services/accessibility/speechd.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.speechd;
inherit (lib)
getExe
mkEnableOption
mkIf
mkPackageOption
;
in
{
options.services.speechd = {
# FIXME: figure out how to deprecate this EXTREMELY CAREFULLY
enable = mkEnableOption "speech-dispatcher speech synthesizer daemon" // {
default = true;
};
package = mkPackageOption pkgs "speechd" { };
};

# FIXME: speechd 0.12 (or whatever the next version is)
# will support socket activation, so switch to that once it's out.
config = mkIf cfg.enable {
environment = {
systemPackages = [ cfg.package ];
sessionVariables.SPEECHD_CMD = getExe cfg.package;
};
};
}

0 comments on commit 04d010a

Please sign in to comment.