Merge branch 'main' of https://git.marty.tf/marty/config.nix
This commit is contained in:
commit
dd45dd6380
7 changed files with 132 additions and 28 deletions
|
|
@ -152,10 +152,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
server = {
|
||||
synapse = {
|
||||
subdomain = "yap";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,66 @@
|
|||
}:
|
||||
|
||||
{
|
||||
config = { };
|
||||
config = {
|
||||
server = {
|
||||
arr = {
|
||||
enable = true;
|
||||
};
|
||||
cloud = {
|
||||
immich = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
};
|
||||
media = {
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
jellyseer = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
kavita = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
navidrome = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
};
|
||||
misc = {
|
||||
dawarich = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
forgejo = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
lauti = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
};
|
||||
social = {
|
||||
gotosocial = {
|
||||
enable = true;
|
||||
public = true;
|
||||
};
|
||||
synapse = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
{
|
||||
imports = [
|
||||
./jellyfin.nix
|
||||
./kavita.nix
|
||||
./navidrome.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
}:
|
||||
|
||||
{
|
||||
options.server = {
|
||||
options.server.media = {
|
||||
jellyfin = {
|
||||
enable = lib.mkEnableOption "enable jelyfin";
|
||||
enable = lib.mkEnableOption "enable jellyfin";
|
||||
port = lib.mkOption {
|
||||
default = 8096;
|
||||
description = "set jellyfin port";
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
environment.systemPackages =
|
||||
[ ]
|
||||
++ (
|
||||
if config.server.jellyfin.enable then
|
||||
if config.server.media.jellyfin.enable then
|
||||
[
|
||||
pkgs.jellyfin
|
||||
pkgs.jellyfin-web
|
||||
|
|
@ -46,30 +46,30 @@
|
|||
[ ]
|
||||
);
|
||||
services = {
|
||||
jellyfin = lib.mkIf config.server.jellyfin.enable {
|
||||
jellyfin = lib.mkIf config.server.media.jellyfin.enable {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
seerr = lib.mkIf config.server.jellyseer.enable {
|
||||
seerr = lib.mkIf config.server.media.jellyseer.enable {
|
||||
enable = true;
|
||||
};
|
||||
nginx.virtualHosts = {
|
||||
"${config.server.jellyfin.subdomain}.${config.networking.domain}" =
|
||||
lib.mkIf config.server.jellyfin.public
|
||||
"${config.server.media.jellyfin.subdomain}.${config.networking.domain}" =
|
||||
lib.mkIf config.server.media.jellyfin.public
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${config.server.jellyfin.port}";
|
||||
proxyPass = "http://127.0.0.1:${config.server.media.jellyfin.port}";
|
||||
};
|
||||
};
|
||||
"${config.server.jellyseer.subdomain}.${config.networking.domain}" =
|
||||
lib.mkIf config.server.jellyfin.public
|
||||
"${config.server.media.jellyseer.subdomain}.${config.networking.domain}" =
|
||||
lib.mkIf config.server.media.jellyseer.public
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${config.server.jellyseer.port}";
|
||||
proxyPass = "http://127.0.0.1:${config.server.media.jellyseer.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
49
modules/server/media/kavita.nix
Normal file
49
modules/server/media/kavita.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
server.media.kavita = {
|
||||
enable = lib.mkEnableOption "enable kavita";
|
||||
port = lib.mkOption {
|
||||
default = 3812;
|
||||
description = "kavita port";
|
||||
};
|
||||
public = lib.mkEnableOption "make kavita public";
|
||||
subdomain = lib.mkOption {
|
||||
default = "books";
|
||||
description = "kavita subdomain";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services = {
|
||||
kavita = {
|
||||
enable = config.server.media.kavita.enable;
|
||||
user = config.user.userName;
|
||||
settings = {
|
||||
Port = config.server.media.kavita.port;
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
"${config.server.media.kavita.subdomain}.${config.networking.domain}" =
|
||||
if config.server.media.kavita.public then
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.media.kavita.port}";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -4,9 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = "${config.server.misc.lauti.subdomain}.${config.networking.domain}";
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
server.misc.lauti = {
|
||||
|
|
@ -17,7 +15,7 @@ in
|
|||
};
|
||||
public = lib.mkEnableOption "make lauti public";
|
||||
domain = lib.mkOption {
|
||||
default = "";
|
||||
default = "calendar";
|
||||
description = "lauti domain";
|
||||
};
|
||||
subdomain = lib.mkOption {
|
||||
|
|
@ -32,7 +30,7 @@ in
|
|||
enable = config.server.misc.lauti.enable;
|
||||
settings = {
|
||||
LAUTI_ADMIN_EMAIL = "lauti@${config.networking.domain}";
|
||||
LAUTI_BASE_URL = "https://${domain}";
|
||||
LAUTI_BASE_URL = "https://${config.server.misc.lauti.subdomain}.${config.networking.domain}";
|
||||
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/lauti/osm";
|
||||
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||
LAUTI_TIMEZONE = "Europe/Berlin";
|
||||
|
|
@ -42,7 +40,7 @@ in
|
|||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
"${domain}" =
|
||||
"${config.server.misc.lauti.subdomain}.${config.networking.domain}" =
|
||||
if config.server.misc.lauti.public then
|
||||
{
|
||||
enableACME = true;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
server.synapse = {
|
||||
server.social.synapse = {
|
||||
enable = lib.mkEnableOption "enable synapse";
|
||||
subdomain = lib.mkOption {
|
||||
default = "yap";
|
||||
|
|
@ -33,7 +33,7 @@ in
|
|||
};
|
||||
config = {
|
||||
services =
|
||||
if config.server.synapse.enable then
|
||||
if config.server.social.synapse.enable then
|
||||
{
|
||||
postgresql.enable = true;
|
||||
matrix-synapse = {
|
||||
|
|
@ -68,7 +68,7 @@ in
|
|||
};
|
||||
listeners = [
|
||||
{
|
||||
port = config.server.synapse.port;
|
||||
port = config.server.social.synapse.port;
|
||||
bind_addresses = [ "127.0.0.1" ];
|
||||
type = "http";
|
||||
tls = false;
|
||||
|
|
@ -94,12 +94,12 @@ in
|
|||
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||
};
|
||||
"${config.server.synapse.subdomain}.${config.networking.domain}" = {
|
||||
"${config.server.social.synapse.subdomain}.${config.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
"~ ^(/_matrix|/_synapse/client|/)" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.synapse.port}";
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.social.synapse.port}";
|
||||
proxyWebsockets = true;
|
||||
extraConfig =
|
||||
"proxy_set_header X-Forwarded-For $remote_addr;"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue