mirror of
https://github.com/nmasur/dotfiles
synced 2025-11-13 10:12:42 +00:00
enable mealie for recipes
This commit is contained in:
40
platforms/nixos/modules/nmasur/presets/services/mealie.nix
Normal file
40
platforms/nixos/modules/nmasur/presets/services/mealie.nix
Normal 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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user