diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 8e4856ec0cd1..12b9dc435378 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -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). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5903916b62a7..4999526259f0 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/services/misc/hyprwhspr-rs.nix b/nixos/modules/services/misc/hyprwhspr-rs.nix new file mode 100644 index 000000000000..e21f310ccf30 --- /dev/null +++ b/nixos/modules/services/misc/hyprwhspr-rs.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; + }; + }; + }; +}