add tts and stuff

This commit is contained in:
Ingolf Wagner 2023-06-21 08:34:43 +02:00
parent 0e6bc2de14
commit 689a95d690
Signed by: palo
GPG key ID: 76BF5F1928B9618B
5 changed files with 49 additions and 18 deletions

View file

@ -159,23 +159,19 @@ with lib;
'';
# todo : still needed?
home.file.".xprofile".text = ''
# to allow sudo commands to access X
# todo : only allow the browsers and rambox access
${pkgs.xorg.xhost}/bin/xhost +
# no shitty pcspkr crap
${pkgs.xorg.xset}/bin/xset -b
# no sleeping monitor
${pkgs.xorg.xset}/bin/xset -dpms
${pkgs.xorg.xset}/bin/xset s off
${pkgs.flameshot}/bin/flameshot &
# cleanup xmonad
rm -f ~/.xmonad/xmonad.state
'';
# home.file.".xprofile".text = ''
# # to allow sudo commands to access X
# # todo : only allow the browsers and rambox access
# ${pkgs.xorg.xhost}/bin/xhost +
# # no shitty pcspkr crap
# ${pkgs.xorg.xset}/bin/xset -b
# # no sleeping monitor
# ${pkgs.xorg.xset}/bin/xset -dpms
# ${pkgs.xorg.xset}/bin/xset s off
# ${pkgs.flameshot}/bin/flameshot &
# # cleanup xmonad
# rm -f ~/.xmonad/xmonad.state
# '';
xdg.configFile."khal/config".text = ''
[calendars]

View file

@ -127,6 +127,9 @@ in
config = {
modifier = "Mod4";
terminal = "alacritty";
focus = {
followMouse = true;
};
startup =
let
height = config.configuration.desktop.height;
@ -190,6 +193,7 @@ in
};
};
}];
colors = with colorTheme; {
background = background;
focused = {
@ -221,6 +225,7 @@ in
text = foreground;
};
};
keybindings = {
"Print" = "exec ${pkgs.flameshot}/bin/flameshot gui -c -p /share/";
"${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}";

View file

@ -44,6 +44,7 @@
./trilium.nix
./cache.nix
./tts.nix
];

View file

@ -0,0 +1,29 @@
{ pkgs
, config
, ...
}: {
systemd.services.tts = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.espeak ];
environment.HOME = "/var/lib/tts";
serviceConfig = {
StateDirectory = "tts";
DynamicUser = true;
User = "tts";
Group = "tts";
ExecStart = ''
${pkgs.tts}/bin/tts-server --model_name tts_models/en/ljspeech/vits --port 5004
'';
};
};
services.nginx = {
recommendedProxySettings = true;
enable = true;
virtualHosts."tts.${config.networking.hostName}.private" = {
locations."/".proxyPass = "http://localhost:5004";
};
};
}

View file

@ -30,8 +30,8 @@
SHOW_FOOTER_VERSION = false;
};
};
};
backup.dirs = [ "/var/lib/gitea" ];
}