feat: enable realtime-stt-server and whisper-overlay

This commit is contained in:
oddlama 2024-06-23 20:58:30 +02:00
parent 51acddd147
commit 3c3429e2cb
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 29 additions and 17 deletions

View file

@ -13,6 +13,7 @@
inputs.nix-index-database.hmModules.nix-index
inputs.nixvim.homeManagerModules.nixvim
inputs.wired-notify.homeManagerModules.default
inputs.whisper-overlay.homeManagerModules.default
{
home.stateVersion = config.system.stateVersion;
}

6
flake.lock generated
View file

@ -2041,11 +2041,11 @@
"pre-commit-hooks": "pre-commit-hooks_6"
},
"locked": {
"lastModified": 1719155732,
"narHash": "sha256-YrC40vbsRYFATRHbQ6UKhU1ByH6xrbSwAfmn4Ae4zhU=",
"lastModified": 1719168621,
"narHash": "sha256-w5LbzmXlkm1uwjjS2s/0mBOqbQFD8gOr+ebd2a2varE=",
"owner": "oddlama",
"repo": "whisper-overlay",
"rev": "8e75dcae2fc1f1e26bf129a4dbdbe05cbb1e8784",
"rev": "4ba57d95fa85fb071d49c29e974d4bcc69e92bc1",
"type": "github"
},
"original": {

View file

@ -24,6 +24,7 @@
./rofi.nix
./swaync.nix
./swww.nix
./whisper-overlay.nix
]
++ lib.optionals nixosConfig.graphical.gaming.enable [
./games

View file

@ -118,11 +118,12 @@ in {
decoration.rounding = 4;
exec-once = [
"${pkgs.waybar}/bin/waybar"
"${pkgs.swaynotificationcenter}/bin/swaync"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user restart xdg-desktop-portal.service"
"${pkgs.waybar}/bin/waybar"
"${pkgs.swaynotificationcenter}/bin/swaync"
"${lib.getExe pkgs.whisper-overlay}"
];
input = {

View file

@ -99,19 +99,21 @@
connected-active = "<span foreground='red'></span>";
};
return-type = "json";
#exec = "${lib.getExe pkgs.whisper-overlay} waybar-status";
on-click-middle = lib.getExe (pkgs.writeShellApplication {
name = "restart-whisper-overlay";
runtimeInputs = [];
# FIXME: TODO and use libnotify
text = ''
'';
});
exec = "${lib.getExe pkgs.whisper-overlay} waybar-status";
on-click-right = lib.getExe (pkgs.writeShellApplication {
name = "toggle-realtime-stt-server";
runtimeInputs = [];
# FIXME: TODO and use libnotify
runtimeInputs = [
pkgs.systemd
pkgs.libnotify
];
text = ''
if systemctl --user is-active --quiet realtime-stt-server; then
systemctl --user stop realtime-stt-server.service
notify-send "Stopped realtime-stt-server" " Stopped" --transient || true
else
systemctl --user start realtime-stt-server.service
notify-send "Started realtime-stt-server" " Started" --transient || true
fi
'';
});
escape = true;
@ -196,9 +198,9 @@
network = {
interval = 5;
format-ethernet = "󰈀 {ipaddr}/{cidr}";
format-ethernet = "󰈀 {ipaddr}/{cidr} <span color='#ffead3'> {bandwidthDownBytes}</span> <span color='#ecc6d9'> {bandwidthUpBytes}</span>";
format-disconnected = " Disconnected";
tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}";
tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}";
};
bluetooth = {

View file

@ -0,0 +1,7 @@
{
home.persistence."/state".directories = [
".local/state/realtime-stt-server"
];
services.realtime-stt-server.enable = true;
}