mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
services/jellyfin: LDAP + marisa proxy:
This commit is contained in:
parent
06654639b6
commit
a81432f8ab
4 changed files with 62 additions and 7 deletions
|
|
@ -4,6 +4,7 @@
|
|||
services.dnscrypt-proxy
|
||||
profiles.network
|
||||
services.nginx
|
||||
services.access
|
||||
users.kat.server
|
||||
];
|
||||
|
||||
|
|
|
|||
24
config/services/access.nix
Normal file
24
config/services/access.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, meta, ... }: {
|
||||
deploy.tf.dns.records.services_media_forward = {
|
||||
inherit (config.network.dns) zone;
|
||||
domain = "media";
|
||||
cname = { inherit (config.network.addresses.public) target; };
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"media.${config.network.dns.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
"/jellyfin/".proxyPass = "http://${meta.network.nodes.yukari.network.addresses.wireguard.nixos.ipv4.address}:8096/jellyfin/";
|
||||
"/jellyfin/socket" = {
|
||||
proxyPass = "http://${meta.network.nodes.yukari.network.addresses.wireguard.nixos.ipv4.address}:8096/jellyfin/";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -20,10 +20,15 @@
|
|||
from = 32768;
|
||||
to = 60999;
|
||||
}];
|
||||
private.tcp.ranges = [{
|
||||
from = 32768;
|
||||
to = 60999;
|
||||
}];
|
||||
private.tcp = {
|
||||
ports = [
|
||||
8096
|
||||
];
|
||||
ranges = [{
|
||||
from = 32768;
|
||||
to = 60999;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
services.jellyfin.enable = true;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@
|
|||
olcTLSCertificateKeyFile = "/var/lib/acme/domain-auth/key.pem";
|
||||
};
|
||||
children = {
|
||||
"cn=module" = {
|
||||
attrs = {
|
||||
objectClass = "olcModuleList";
|
||||
olcModuleLoad = "memberof";
|
||||
};
|
||||
};
|
||||
"cn=schema" = {
|
||||
attrs = {
|
||||
cn = "schema";
|
||||
|
|
@ -26,6 +32,21 @@
|
|||
"${pkgs.openldap}/etc/schema/nis.ldif"
|
||||
];
|
||||
};
|
||||
"olcOverlay=memberof,olcDatabase={1}mdb" = {
|
||||
attrs = {
|
||||
objectClass = [
|
||||
"olcOverlayConfig"
|
||||
"olcMemberOf"
|
||||
"olcConfig"
|
||||
];
|
||||
olcOverlay = "memberof";
|
||||
olcMemberOfDangling = "ignore";
|
||||
olcMemberOfGroupOC = "groupOfNames";
|
||||
olcMemberOfMemberAD = "member";
|
||||
olcMemberOfMemberOfAD = "memberOf";
|
||||
olcMemberOfRefint = "TRUE";
|
||||
};
|
||||
};
|
||||
"olcDatabase={-1}frontend" = {
|
||||
attrs = {
|
||||
objectClass = [
|
||||
|
|
@ -76,9 +97,13 @@
|
|||
''{3}to dn.subtree="ou=services,dc=kittywit,dc=ch"
|
||||
by dn.base="cn=dovecot,dc=mail,dc=kittywit,dc=ch" read
|
||||
by dn.subtree="ou=services,dc=kittywit,dc=ch" read
|
||||
by * none''
|
||||
''{4}to attrs=mail by self read''
|
||||
''{5}to * by * read''
|
||||
by * none''
|
||||
''{4}to dn.subtree="ou=groups,dc=kittywit,dc=ch"
|
||||
by dn.subtree="ou=users,dc=kittywit,dc=ch" read
|
||||
by dn.subtree="ou=services,dc=kittywit,dc=ch" read
|
||||
by * none''
|
||||
''{5}to attrs=mail by self read''
|
||||
''{6}to * by * read''
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue