This commit is contained in:
Tristan 2024-02-26 18:26:21 +00:00
parent 7fc3164ab8
commit a8b581f499
12 changed files with 81 additions and 64 deletions

View file

@ -1,8 +1,7 @@
{config, ...}:
let
{config, ...}: let
anki = config.services.anki-sync-server;
secrets = config.sops.secrets;
domain = "tristans.cloud";
domain = config.networking.domain;
in {
sops.secrets."anki/password" = {
owner = "anki";
@ -21,11 +20,14 @@ in {
services.nginx.virtualHosts."anki.${domain}" = {
forceSSL = true;
enableACME = true;
locations."~".proxyPass = "http://localhost:${toString anki.port}";
locations."~".proxyPass = "http://localhost:${toString anki.port}";
};
# TODO: this really ought to be part of the nixpkgs anki-sync-server module
users.users.anki = { group = "anki"; isSystemUser = true; };
users.users.anki = {
group = "anki";
isSystemUser = true;
};
users.groups.anki = {};
systemd.services.anki-sync-server.serviceConfig.User = "anki";
}