diff --git a/machines/fuuko/configuration.nix b/machines/fuuko/configuration.nix index 65196fa..7ffe9c3 100644 --- a/machines/fuuko/configuration.nix +++ b/machines/fuuko/configuration.nix @@ -5,6 +5,7 @@ ../../modules ../../users/simon + ./services/ankisyncd.nix ./services/dnsmasq.nix ./services/grafana.nix ./services/media.nix diff --git a/machines/fuuko/services/ankisyncd.nix b/machines/fuuko/services/ankisyncd.nix new file mode 100644 index 0000000..5072729 --- /dev/null +++ b/machines/fuuko/services/ankisyncd.nix @@ -0,0 +1,17 @@ +{ config, ... }: +let + cfg = config.services.ankisyncd; +in +{ + services.ankisyncd = { + enable = true; + host = "127.0.0.1"; + }; + + services.nginx.virtualHosts."anki.sbruder.de" = { + enableACME = true; + forceSSL = true; + + locations."/".proxyPass = "http://${cfg.host}:${toString cfg.port}"; + }; +}