WIP MADDY

This commit is contained in:
uku 2025-01-04 00:04:54 +01:00
parent 6a87dd7211
commit d45010f67f
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
6 changed files with 260 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
setupSecrets =
_config:
@ -96,4 +96,20 @@
}
];
};
# shamelessly stolen from soopyc's gensokyo
mkNginxFile =
{
filename ? "index.html",
content,
status ? 200,
}:
{
# gets the store path of the directory in which the file is contained
# we have to use writeTextDir because we don't want to expose the whole nix store to nginx
# and because you can't just return an absolute path to a file
alias = builtins.toString (pkgs.writeTextDir filename content) + "/";
tryFiles = "${filename} =${builtins.toString status}";
};
}