mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: enable realtime-stt-server and whisper-overlay
This commit is contained in:
parent
51acddd147
commit
3c3429e2cb
6 changed files with 29 additions and 17 deletions
|
@ -13,6 +13,7 @@
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
inputs.wired-notify.homeManagerModules.default
|
inputs.wired-notify.homeManagerModules.default
|
||||||
|
inputs.whisper-overlay.homeManagerModules.default
|
||||||
{
|
{
|
||||||
home.stateVersion = config.system.stateVersion;
|
home.stateVersion = config.system.stateVersion;
|
||||||
}
|
}
|
||||||
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -2041,11 +2041,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks_6"
|
"pre-commit-hooks": "pre-commit-hooks_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719155732,
|
"lastModified": 1719168621,
|
||||||
"narHash": "sha256-YrC40vbsRYFATRHbQ6UKhU1ByH6xrbSwAfmn4Ae4zhU=",
|
"narHash": "sha256-w5LbzmXlkm1uwjjS2s/0mBOqbQFD8gOr+ebd2a2varE=",
|
||||||
"owner": "oddlama",
|
"owner": "oddlama",
|
||||||
"repo": "whisper-overlay",
|
"repo": "whisper-overlay",
|
||||||
"rev": "8e75dcae2fc1f1e26bf129a4dbdbe05cbb1e8784",
|
"rev": "4ba57d95fa85fb071d49c29e974d4bcc69e92bc1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./swww.nix
|
./swww.nix
|
||||||
|
./whisper-overlay.nix
|
||||||
]
|
]
|
||||||
++ lib.optionals nixosConfig.graphical.gaming.enable [
|
++ lib.optionals nixosConfig.graphical.gaming.enable [
|
||||||
./games
|
./games
|
||||||
|
|
|
@ -118,11 +118,12 @@ in {
|
||||||
|
|
||||||
decoration.rounding = 4;
|
decoration.rounding = 4;
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"${pkgs.waybar}/bin/waybar"
|
|
||||||
"${pkgs.swaynotificationcenter}/bin/swaync"
|
|
||||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||||
"systemctl --user restart xdg-desktop-portal.service"
|
"systemctl --user restart xdg-desktop-portal.service"
|
||||||
|
"${pkgs.waybar}/bin/waybar"
|
||||||
|
"${pkgs.swaynotificationcenter}/bin/swaync"
|
||||||
|
"${lib.getExe pkgs.whisper-overlay}"
|
||||||
];
|
];
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
|
|
|
@ -99,19 +99,21 @@
|
||||||
connected-active = "<span foreground='red'></span>";
|
connected-active = "<span foreground='red'></span>";
|
||||||
};
|
};
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
#exec = "${lib.getExe pkgs.whisper-overlay} waybar-status";
|
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 = ''
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
on-click-right = lib.getExe (pkgs.writeShellApplication {
|
on-click-right = lib.getExe (pkgs.writeShellApplication {
|
||||||
name = "toggle-realtime-stt-server";
|
name = "toggle-realtime-stt-server";
|
||||||
runtimeInputs = [];
|
runtimeInputs = [
|
||||||
# FIXME: TODO and use libnotify
|
pkgs.systemd
|
||||||
|
pkgs.libnotify
|
||||||
|
];
|
||||||
text = ''
|
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;
|
escape = true;
|
||||||
|
@ -196,9 +198,9 @@
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format-ethernet = " {ipaddr}/{cidr}";
|
format-ethernet = " {ipaddr}/{cidr} <span color='#ffead3'>↓ {bandwidthDownBytes}</span> <span color='#ecc6d9'>↑ {bandwidthUpBytes}</span>";
|
||||||
format-disconnected = "⚠ Disconnected";
|
format-disconnected = "⚠ Disconnected";
|
||||||
tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}";
|
tooltip-format = "↑ {bandwidthUpBytes}\n↓ {bandwidthDownBytes}";
|
||||||
};
|
};
|
||||||
|
|
||||||
bluetooth = {
|
bluetooth = {
|
||||||
|
|
7
users/myuser/graphical/whisper-overlay.nix
Normal file
7
users/myuser/graphical/whisper-overlay.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
home.persistence."/state".directories = [
|
||||||
|
".local/state/realtime-stt-server"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.realtime-stt-server.enable = true;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue