1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{
pkgs,
lib,
jolheiser,
config,
...
}:
let
enable = true;
port = 3663;
host = "recipes.${jolheiser.domain}";
in
lib.mkIf enable {
age.secrets.mealie.file = ../../secrets/mealie.age;
services = {
mealie = {
enable = true;
# TODO remove this hack once mealie tests work again
package = pkgs.mealie.overrideAttrs (
_: _: {
doCheck = false;
checkPhase = ''echo "Skipping tests for mealie"'';
installCheckPhase = ''echo "Skipping install tests for mealie"'';
}
);
listenAddress = "localhost";
inherit port;
settings = {
BASE_URL = "https://${host}";
ALLOW_PASSWORD_LOGIN = "false";
};
credentialsFile = config.age.secrets.mealie.path;
};
caddy.virtualHosts."${host}".extraConfig = ''
reverse_proxy localhost:${builtins.toString port}
'';
};
}
|