niksos/hosts/chmura/ankisyncd.nix
2023-09-13 16:52:19 +02:00

28 lines
623 B
Nix

{
config,
config',
...
}: {
services.ankisyncd = {
enable = true;
port = 27701;
};
services.caddy = {
enable = true;
virtualHosts."a.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:27701
'';
};
age.secrets.ankisyncd-user-credentials = {
file = ../../secrets/ankisyncd-user-credentials.age;
mode = "700";
owner = config'.username;
group = "users";
};
environment.sessionVariables = {
SYNC_USER1 = "${builtins.readFile config.age.secrets.ankisyncd-user-credentials.path}";
};
}