weilite/{restic,ocis}: add
This commit is contained in:
parent
4822043a8b
commit
bba16ea4da
5 changed files with 89 additions and 29 deletions
|
@ -1,36 +1,35 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"ocis/env" = {
|
||||
sopsFile = ../secrets.yaml;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.ocis = {
|
||||
enable = true;
|
||||
package = pkgs.ocis-bin;
|
||||
package = pkgs.ocis;
|
||||
stateDir = "/var/lib/ocis";
|
||||
url = "https://drive.xinyang.life:8443";
|
||||
address = "127.0.0.1";
|
||||
port = 9200;
|
||||
configDir = "/var/lib/ocis/config";
|
||||
environment = {
|
||||
OCIS_INSECURE = "false";
|
||||
OCIS_LOG_LEVEL = "trace";
|
||||
PROXY_TLS = "false";
|
||||
OCIS_LOG_LEVEL = "debug";
|
||||
OCIS_LOG_PRETTY = "true";
|
||||
# For reverse proxy. Disable tls.
|
||||
OCIS_PROXY_TLS = "false";
|
||||
WEB_OIDC_CLIENT_ID = "owncloud";
|
||||
WEB_OIDC_ISSUER = "https://auth.xinyang.life/oauth2/openid/owncloud";
|
||||
PROXY_AUTOPROVISION_ACCOUNTS = "true";
|
||||
PROXY_USER_OIDC_CLAIM = "preferred_username";
|
||||
PROXY_OIDC_ISSUER = "https://auth.xinyang.life/oauth2/openid/owncloud";
|
||||
PROXY_OIDC_REWRITE_WELLKNOWN = "false";
|
||||
PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD = "none";
|
||||
OCIS_EXCLUDE_RUN_SERVICES = "idp";
|
||||
PROXY_OIDC_REWRITE_WELLKNOWN = "true";
|
||||
WEB_HTTP_ADDR = "127.0.0.1:12345";
|
||||
WEB_OIDC_METADATA_URL = "https://auth.xinyang.life/oauth2/openid/owncloud/.well-known/openid-configuration";
|
||||
WEB_OIDC_AUTHORITY = "https://auth.xinyang.life/oauth2/openid/owncloud";
|
||||
WEB_OIDC_CLIENT_ID = "owncloud";
|
||||
};
|
||||
# environmentFile = config.sops.secrets."ocis/env".path;
|
||||
};
|
||||
|
||||
networking.allowedTCPPorts = [ 8443 ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8443 ];
|
||||
services.caddy.virtualHosts."${config.services.ocis.url}".extraConfig = ''
|
||||
reverse_proxy ${config.services.ocis.address}:${config.services.ocis.address}
|
||||
redir /.well-known/openid-configuration https://auth.xinyang.life/oauth2/openid/owncloud-android/.well-known/openid-configuration permanent
|
||||
reverse_proxy ${config.services.ocis.address}:${toString config.services.ocis.port}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue