mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add frontends
This commit is contained in:
parent
4b3808c042
commit
92528d7121
8 changed files with 87 additions and 58 deletions
41
modules/nixos/server/frontends.nix
Normal file
41
modules/nixos/server/frontends.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.server;
|
||||
ports = cfg.nginx.ports;
|
||||
in with lib; {
|
||||
options.mods.server = {
|
||||
videos = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables invidious server";
|
||||
};
|
||||
};
|
||||
|
||||
reddit = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables redlib server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.invidious = mkIf cfg.videos.enable {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
port = ports.videos;
|
||||
|
||||
settings = {
|
||||
db.user = "invidious";
|
||||
db.dbname = "invidious";
|
||||
};
|
||||
};
|
||||
|
||||
services.redlib = mkIf cfg.reddit.enable {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
address = "0.0.0.0";
|
||||
port = ports.reddit;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue