feat: add utility functions

This commit is contained in:
uku 2024-07-29 10:58:43 +02:00
parent ca71ddac8c
commit b8d7062228
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
12 changed files with 177 additions and 156 deletions

View file

@ -1,14 +1,16 @@
{
config,
mkSecret,
_utils,
...
}: {
cfTunnels."git.uku3lig.net" = "http://localhost:3000";
age.secrets = mkSecret "turnstileSecret" {
}: let
turnstileSecret = _utils.setupSingleSecret config "turnstileSecret" {
owner = "forgejo";
group = "forgejo";
};
in {
imports = [turnstileSecret.generate];
cfTunnels."git.uku3lig.net" = "http://localhost:3000";
services = {
forgejo = {
@ -20,7 +22,7 @@
};
secrets = {
service.CF_TURNSTILE_SECRET = config.age.secrets.turnstileSecret.path;
service.CF_TURNSTILE_SECRET = turnstileSecret.path;
};
settings = {