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

View file

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

View file

@ -44,6 +44,7 @@
./trilium.nix ./trilium.nix
./cache.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; SHOW_FOOTER_VERSION = false;
}; };
}; };
}; };
backup.dirs = [ "/var/lib/gitea" ]; backup.dirs = [ "/var/lib/gitea" ];
} }