wiki: Enable paperless, outline and dex with nginx

This commit is contained in:
Payas Relekar 2023-06-05 02:07:20 +05:30
parent e1da4d958a
commit 2a04d3330c

View file

@ -19,7 +19,7 @@
services = {
paperless = {
enable = false;
enable = true;
address = "0.0.0.0";
port = 28981;
consumptionDirIsPublic = true;
@ -38,7 +38,7 @@
};
dex = {
enable = false;
enable = true;
settings = {
issuer = "http://dex.bebop";
storage = {
@ -51,7 +51,7 @@
id = "outline";
name = "Outline Client";
redirectURIs = [
"http://bebop:3000/auth/oidc.callback"
"https://outline.bhankas.org/auth/oidc.callback"
];
secretFile = "${pkgs.writeText "outline-oidc-secret" "test123"}";
}
@ -71,7 +71,7 @@
};
outline = {
enable = false;
enable = true;
# port = 3000;
publicUrl = "http://0.0.0.0:3000";
enableUpdateCheck = false;
@ -93,9 +93,9 @@
uploadBucketName = "outline";
};
oidcAuthentication = {
authUrl = "http://dex.bebop/auth";
tokenUrl = "http://dex.bebop/token";
userinfoUrl = "http://dex.bebop/userinfo";
authUrl = "https://dex.bhankas.org/auth";
tokenUrl = "https://dex.bhankas.org/token";
userinfoUrl = "https://dex.bhankas.org/userinfo";
clientId = "outline";
clientSecretFile = (builtins.elemAt config.services.dex.settings.staticClients 0).secretFile;
scopes = [ "openid" "email" "profile" ];
@ -104,6 +104,7 @@
};
};
# TODO: Split to their respective locations
nginx = {
enable = true;
virtualHosts = {
@ -124,6 +125,24 @@
enableACME = true;
locations."/".proxyPass = "http://${config.services.minio.consoleAddress}";
};
"paperless.bhankas.org" = {
addSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:28981";
};
"outline.bhankas.org" = {
addSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:3000";
};
"dex.bhankas.org" = {
addSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:5556";
};
};
};
};
@ -145,6 +164,21 @@
email = "relekarpayas@gmail.com";
dnsResolver = "1.1.1.1:53";
};
"paperless.bhankas.org" = {
email = "relekarpayas@gmail.com";
dnsResolver = "1.1.1.1:53";
};
"outline.bhankas.org" = {
email = "relekarpayas@gmail.com";
dnsResolver = "1.1.1.1:53";
};
"dex.bhankas.org" = {
email = "relekarpayas@gmail.com";
dnsResolver = "1.1.1.1:53";
};
};
};
}