enable mealie for recipes

This commit is contained in:
Noah Masur
2025-11-11 04:00:51 +00:00
parent c13e029805
commit 407e9c3af8
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
{ config, lib, ... }:
let
inherit (config.nmasur.settings) hostnames;
cfg = config.nmasur.presets.services.mealie;
in
{
options.nmasur.presets.services.mealie.enable = lib.mkEnableOption "mealie recipe manager";
config = lib.mkIf cfg.enable {
services.mealie = {
enable = true;
port = 9099;
database.createLocally = true;
listenAddress = "127.0.0.1";
};
nmasur.presets.services.caddy.routes = [
{
match = [ { host = [ hostnames.recipes ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.mealie.port}"; } ];
}
];
}
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ hostnames.recipes ];
# Point localhost to the local domain
networking.hosts."127.0.0.1" = [ hostnames.recipes ];
};
}

View File

@@ -30,6 +30,7 @@ in
karakeep.enable = lib.mkDefault true;
litestream.enable = lib.mkDefault true;
mathesar.enable = lib.mkDefault true;
mealie.enable = lib.mkDefault true;
minecraft-server.enable = lib.mkDefault false;
n8n.enable = lib.mkDefault true;
nix-autoupgrade.enable = lib.mkDefault true; # On by default for communications