mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
service/tandoor-recipes: init
This commit is contained in:
parent
9c575dd93d
commit
1d5435b49e
3 changed files with 46 additions and 0 deletions
|
@ -65,6 +65,10 @@ in
|
||||||
ssh-server = {
|
ssh-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
# self-hosted recipe manager
|
||||||
|
tandoor-recipes = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
# Webserver
|
# Webserver
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
./passworts
|
./passworts
|
||||||
./rss-bridge
|
./rss-bridge
|
||||||
./ssh-server
|
./ssh-server
|
||||||
|
./tandoor-recipes
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
41
modules/services/tandoor-recipes/default.nix
Normal file
41
modules/services/tandoor-recipes/default.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue