Commit 56f55213e32d

Vincent Demeester <vincent@sbr.pm>
2026-01-08 15:07:50
feat(niri): Add voxtype voice-to-text integration
- Enable offline push-to-talk dictation with local Whisper - Use F13 hotkey available on moonlander and corne keyboards - Apply desktop-wide for all niri systems with auto-starting daemon Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 83c7b05
Changed files (1)
home
common
desktop
home/common/desktop/niri/default.nix
@@ -19,6 +19,9 @@
     wofi
     rofimoji
     swaybg
+
+    # Voice-to-text with Whisper
+    wip.voxtype
   ];
 
   services = {
@@ -39,4 +42,50 @@
       ];
     };
   };
+
+  # Voxtype configuration (voice-to-text with Whisper)
+  xdg.configFile."voxtype/config.toml".text = ''
+    [hotkey]
+    enabled = true
+    # F13 key - available on moonlander and corne keyboards
+    # For laptops, can be mapped via kanata or similar tools
+    key = "F13"
+
+    [audio]
+    # Silence threshold in dB - adjust if needed
+    silence_threshold = -30.0
+
+    [whisper]
+    # "base" model balances speed and accuracy
+    # Options: tiny, base, small, medium, large
+    model = "base"
+
+    [output]
+    # Use wtype for Wayland text input
+    mode = "type"
+  '';
+
+  # Voxtype systemd service
+  systemd.user.services.voxtype = {
+    Unit = {
+      Description = "Voxtype - Push-to-talk voice-to-text daemon";
+      Documentation = "https://voxtype.io/";
+      After = [ "graphical-session.target" ];
+      PartOf = [ "graphical-session.target" ];
+    };
+
+    Service = {
+      Type = "simple";
+      ExecStart = "${pkgs.wip.voxtype}/bin/voxtype daemon";
+      Restart = "on-failure";
+      RestartSec = 5;
+      Environment = [
+        "PATH=${pkgs.wtype}/bin"
+      ];
+    };
+
+    Install = {
+      WantedBy = [ "graphical-session.target" ];
+    };
+  };
 }