diff --git a/hosts/nixos/jeeves/anki.nix b/hosts/nixos/jeeves/anki.nix new file mode 100644 index 0000000..41d3b4f --- /dev/null +++ b/hosts/nixos/jeeves/anki.nix @@ -0,0 +1,31 @@ +{ inputs, lib, pkgs, config, ... }: + +{ + age.secrets."anki.reo101" = { + rekeyFile = "${inputs.self}/secrets/home/jeeves/anki/reo101.age"; + mode = "400"; + }; + + services.anki-sync-server = { + enable = true; + package = pkgs.anki-sync-server; + users = [ + { + username = "reo101"; + passwordFile = config.age.secrets."anki.reo101".path; + } + ]; + address = "0.0.0.0"; + port = 27701; + }; + + services.nginx = { + virtualHosts."anki.jeeves.local" = { + enableACME = false; + forceSSL = false; + locations."/" = { + proxyPass = "http://127.0.0.1:${builtins.toString config.services.anki-sync-server.port}"; + }; + }; + }; +} diff --git a/hosts/nixos/jeeves/configuration.nix b/hosts/nixos/jeeves/configuration.nix index df5e3c6..fa3e568 100644 --- a/hosts/nixos/jeeves/configuration.nix +++ b/hosts/nixos/jeeves/configuration.nix @@ -20,6 +20,7 @@ # ./nextcloud.nix ./paperless.nix ./podman.nix + ./anki.nix ]; # services.kanidm = { }; diff --git a/secrets/home/jeeves/anki/reo101.age b/secrets/home/jeeves/anki/reo101.age new file mode 100644 index 0000000..736029c --- /dev/null +++ b/secrets/home/jeeves/anki/reo101.age @@ -0,0 +1,8 @@ +age-encryption.org/v1 +-> X25519 jROnYoLUU52v0VQuZVBUlfa/U1+LxqaaHXJkWLqis1Q +tDZKi1bq3h08JOyobEZq7fqAbe/Pyf1YPQj3y9CY8cM +-> KWa-grease bQ\#u] +XzYchZjVfR7y1kZp2PmXyZXyrYqGwZd5iKPERhSdc+3Pd2qU1pxVNJEZcAwcwpyM +/+x8jADcUcWs9+MzgW0qHKzM4vcpLCE +--- 0znfnFvlzrqKXsKHkbH5K7fS+vLMSfEKc84Wm0hFVGg +=$ /ݜz˻P2yg# ?7Qcsq \ No newline at end of file diff --git a/secrets/rekeyed/jeeves/07da270557c68a559523792483734f7c-anki.reo101.age b/secrets/rekeyed/jeeves/07da270557c68a559523792483734f7c-anki.reo101.age new file mode 100644 index 0000000..f7312c6 Binary files /dev/null and b/secrets/rekeyed/jeeves/07da270557c68a559523792483734f7c-anki.reo101.age differ