1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: gaslight

This commit is contained in:
Kierán Meinhardt
2020-09-14 08:33:39 +02:00
parent 2dbe03835c
commit 824dafb93c
3 changed files with 27 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ in {
./flix.nix
./fonts.nix
./fzf.nix
./gaslight.nix
./git.nix
./hledger.nix
./htop.nix

25
configs/gaslight.nix Normal file
View File

@@ -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"
*/

View File

@@ -19,6 +19,7 @@ in {
ports = [ sshPort ];
enable = true;
passwordAuthentication = false;
forwardX11 = true;
};
users.motd = "Welcome to ${config.networking.hostName}!";