nixos/modules/services/tandoor-recipes/default.nix

35 lines
729 B
Nix
Raw Normal View History

2022-12-25 12:07:38 +01:00
# self-hosted recipe manager
{ config, lib, ... }:
let
cfg = config.my.services.tandoor-recipes;
2023-11-07 23:13:51 +01:00
inherit (config.networking) domain;
2022-12-25 12:07:38 +01:00
in
{
options.my.services.tandoor-recipes = with lib; {
enable = mkEnableOption "Tandoor Recipes";
};
config = lib.mkIf cfg.enable {
services.tandoor-recipes = {
enable = true;
};
# Proxy to Tandoor-Recipes
my.services.webserver.virtualHosts = [
2022-12-25 12:07:38 +01:00
{
subdomain = "recipes";
inherit (config.services.tandoor-recipes) port;
2022-12-25 12:07:38 +01:00
}
];
webapps.apps.tandoor-recipes = {
dashboard = {
name = "Recipes";
category = "app";
icon = "utensils";
2023-11-12 20:39:44 +01:00
url = "https://recipes.${domain}";
2022-12-25 12:07:38 +01:00
};
};
};
}