service/tandoor-recipes: init

This commit is contained in:
Felix Buehler 2022-12-25 12:07:38 +01:00
parent 9c575dd93d
commit 1d5435b49e
3 changed files with 46 additions and 0 deletions

View file

@ -65,6 +65,10 @@ in
ssh-server = {
enable = true;
};
# self-hosted recipe manager
tandoor-recipes = {
enable = true;
};
# Webserver
nginx = {
enable = true;

View file

@ -18,6 +18,7 @@
./passworts
./rss-bridge
./ssh-server
./tandoor-recipes
];
}

View file

@ -0,0 +1,41 @@
# self-hosted recipe manager
{ config, lib, ... }:
let
cfg = config.my.services.tandoor-recipes;
domain = config.networking.domain;
in
{
options.my.services.tandoor-recipes = with lib; {
enable = mkEnableOption "Tandoor Recipes";
port = mkOption {
type = types.port;
default = 8089;
example = 8080;
description = "Internal port";
};
};
config = lib.mkIf cfg.enable {
services.tandoor-recipes = {
enable = true;
port = cfg.port;
};
# Proxy to Tandoor-Recipes
my.services.nginx.virtualHosts = [
{
subdomain = "recipes";
inherit (cfg) port;
}
];
webapps.apps.tandoor-recipes = {
dashboard = {
name = "Recipes";
category = "app";
icon = "utensils";
link = "https://recipes.${domain}";
};
};
};
}