Home

infra @9e9d01d3a7a385ef214288b72455566d67ec9155 - refs - log -
-
https://git.jolheiser.com/infra.git
dragonwell flake
infra / dragonwell / services / mealie.nix
- raw -
 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
{
  pkgs,
  jolheiser,
  config,
  ...
}:
let
  port = 3663;
  host = "recipes.${jolheiser.domain}";
in
{
  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}
    '';
  };
}