diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 090236780abf8..f288075c1f21a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/services/accessibility/speechd.nix b/nixos/modules/services/accessibility/speechd.nix new file mode 100644 index 0000000000000..811535e8baf1d --- /dev/null +++ b/nixos/modules/services/accessibility/speechd.nix @@ -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; + }; + }; +}