diff --git a/configs/default.nix b/configs/default.nix index 265c1e5..1fec88d 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -19,6 +19,7 @@ in { ./flix.nix ./fonts.nix ./fzf.nix + ./gaslight.nix ./git.nix ./hledger.nix ./htop.nix diff --git a/configs/gaslight.nix b/configs/gaslight.nix new file mode 100644 index 0000000..0f7bed5 --- /dev/null +++ b/configs/gaslight.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ + (pkgs.writers.writeDashBin "gaslight-stream" '' + ${pkgs.ffmpeg}/bin/ffmpeg -r 14 -s 640x480 -f video4linux2 -i /dev/video0 -f alsa -i default -c:v libx264 -preset ultrafast -c:a aac -f avi - + '') + (pkgs.writers.writeDashBin "gaslight-say" '' + voices="de + de+whisper" + + echo "$@" | ${pkgs.espeak}/bin/espeak -v "$(echo "$voices" | ${pkgs.coreutils}/bin/shuf -n1)" + '') + (pkgs.writers.writeDashBin "gaslight-play" '' + set -o noglob + ${pkgs.mpv}/bin/mpv --no-video "$1" + '') + ]; +} + +/* + +ssh machine gaslight-stream | mpv - +ssh machine gaslight-say "blablabla" + +*/ diff --git a/configs/ssh.nix b/configs/ssh.nix index 98681dc..67b1ff0 100644 --- a/configs/ssh.nix +++ b/configs/ssh.nix @@ -19,6 +19,7 @@ in { ports = [ sshPort ]; enable = true; passwordAuthentication = false; + forwardX11 = true; }; users.motd = "Welcome to ${config.networking.hostName}!";