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,9 +1,12 @@
{
config,
mkSecret,
_utils,
...
}: {
age.secrets = mkSecret "dendriteKey" {};
}: let
secretKey = _utils.setupSingleSecret config "dendriteKey" {};
in {
imports = [secretKey.generate];
cfTunnels."m.uku.moe" = "http://localhost:80";
systemd.services.dendrite = {
@ -22,7 +25,7 @@
in {
enable = true;
httpPort = 8008;
loadCredential = ["private_key:${config.age.secrets.dendriteKey.path}"];
loadCredential = ["private_key:${secretKey.path}"];
settings = {
global = {