nixos/hyprwhspr-rs: init module
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
|
||||
- [bentopdf](https://github.com/alam00000/bentopdf), a privacy-first PDF toolkit running completely in-browser. Available as [services.bentopdf](#opt-services.bentopdf.enable).
|
||||
|
||||
- [hyprwhspr-rs](https://github.com/better-slop/hyprwhspr-rs), a keybind activated speech-to-text voice dictation utility built for use with Hyprland. Available as `services.hyprwhspr-rs`
|
||||
|
||||
- [DankMaterialShell](https://danklinux.com), a complete desktop shell for Wayland compositors built with Quickshell. Available as [programs.dms-shell](#opt-programs.dms-shell.enable).
|
||||
|
||||
- [dms-greeter](https://danklinux.com), a modern display manager greeter for DankMaterialShell that works with greetd and supports multiple Wayland compositors. Available as [services.displayManager.dms-greeter](#opt-services.displayManager.dms-greeter.enable).
|
||||
|
||||
@@ -873,6 +873,7 @@
|
||||
./services/misc/headphones.nix
|
||||
./services/misc/heisenbridge.nix
|
||||
./services/misc/homepage-dashboard.nix
|
||||
./services/misc/hyprwhspr-rs.nix
|
||||
./services/misc/ihaskell.nix
|
||||
./services/misc/iio-niri.nix
|
||||
./services/misc/input-remapper.nix
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkOption
|
||||
;
|
||||
cfg = config.services.hyprwhspr-rs;
|
||||
in
|
||||
{
|
||||
options.services.hyprwhspr-rs = {
|
||||
enable = mkEnableOption "hyprwhspr-rs";
|
||||
package = mkPackageOption pkgs "hyprwhspr-rs" { };
|
||||
|
||||
environmentFile = mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "/path/to/hyprwhspr_secret_file";
|
||||
description = "File containing API keys (GROQ_API_KEY, GEMINI_API_KEY) for remote transcription.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.services.hyprwhspr-rs = {
|
||||
description = "Native speech-to-text voice dictation for Hyprland";
|
||||
|
||||
after = [
|
||||
"graphical-session.target"
|
||||
"pipewire.service"
|
||||
];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
Restart = "on-failure";
|
||||
LoadCredential = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user