Compare commits
3 Commits
60133da653
...
add-nextcl
| Author | SHA1 | Date | |
|---|---|---|---|
| b180ea43b5 | |||
| 461d96dc75 | |||
| 26d9e3d432 |
@@ -51,6 +51,7 @@
|
|||||||
"/nix/store:/nix/store:ro"
|
"/nix/store:/nix/store:ro"
|
||||||
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
||||||
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
||||||
|
"/var/run/postgresql/:/var/run/postgresql/"
|
||||||
];
|
];
|
||||||
dockerExtraHosts = [
|
dockerExtraHosts = [
|
||||||
# Required to pass the proxy via hut
|
# Required to pass the proxy via hut
|
||||||
|
|||||||
@@ -8,12 +8,14 @@
|
|||||||
{ name = "anavarro"; ensureClauses.superuser = true; }
|
{ name = "anavarro"; ensureClauses.superuser = true; }
|
||||||
{ name = "rarias"; ensureClauses.superuser = true; }
|
{ name = "rarias"; ensureClauses.superuser = true; }
|
||||||
{ name = "grafana"; }
|
{ name = "grafana"; }
|
||||||
|
{ name = "gitlab-runner"; }
|
||||||
];
|
];
|
||||||
authentication = ''
|
authentication = ''
|
||||||
#type database DBuser auth-method
|
#type database DBuser auth-method
|
||||||
local perftestsdb rarias trust
|
local perftestsdb rarias trust
|
||||||
local perftestsdb anavarro trust
|
local perftestsdb anavarro trust
|
||||||
local perftestsdb grafana trust
|
local perftestsdb grafana trust
|
||||||
|
local perftestsdb gitlab-runner trust
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
./nix-serve.nix
|
./nix-serve.nix
|
||||||
./gitlab-runner.nix
|
./gitlab-runner.nix
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
|
./nextcloud.nix
|
||||||
../hut/public-inbox.nix
|
../hut/public-inbox.nix
|
||||||
../hut/msmtp.nix
|
../hut/msmtp.nix
|
||||||
../module/p.nix
|
../module/p.nix
|
||||||
|
|||||||
71
m/tent/nextcloud.nix
Normal file
71
m/tent/nextcloud.nix
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
age.secrets.tent-nextcloud-admin-pass.file = ../../secrets/tent-nextcloud-admin-pass.age;
|
||||||
|
|
||||||
|
services.nextcloud = {
|
||||||
|
package = pkgs.nextcloud32;
|
||||||
|
enable = true;
|
||||||
|
hostName = "localhost";
|
||||||
|
config.adminpassFile = config.age.secrets.tent-nextcloud-admin-pass.path;
|
||||||
|
config.dbtype = "sqlite";
|
||||||
|
extraApps = {
|
||||||
|
inherit (config.services.nextcloud.package.packages.apps)
|
||||||
|
news
|
||||||
|
contacts
|
||||||
|
calendar
|
||||||
|
tasks;
|
||||||
|
# The app richdocuments (i.e. office) is not enabled yet as there are
|
||||||
|
# problems with the WOPI protocol in a subdir.
|
||||||
|
};
|
||||||
|
extraAppsEnable = true;
|
||||||
|
settings = let
|
||||||
|
prot = "https";
|
||||||
|
host = "jungle.bsc.es";
|
||||||
|
dir = "/nextcloud";
|
||||||
|
in {
|
||||||
|
overwriteprotocol = prot;
|
||||||
|
overwritehost = host;
|
||||||
|
overwritewebroot = dir;
|
||||||
|
overwrite.cli.url = "${prot}://${host}${dir}/";
|
||||||
|
htaccess.RewriteBase = dir;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${config.services.nextcloud.hostName}".listen = [ {
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8066; # NOT an exposed port
|
||||||
|
} ];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."jungle.bsc.es".locations = {
|
||||||
|
"^~ /.well-known" = {
|
||||||
|
priority = 9000;
|
||||||
|
extraConfig = ''
|
||||||
|
absolute_redirect off;
|
||||||
|
location ~ ^/\\.well-known/(?:carddav|caldav)$ {
|
||||||
|
return 301 /nextcloud/remote.php/dav;
|
||||||
|
}
|
||||||
|
location ~ ^/\\.well-known/host-meta(?:\\.json)?$ {
|
||||||
|
return 301 /nextcloud/public.php?service=host-meta-json;
|
||||||
|
}
|
||||||
|
location ~ ^/\\.well-known/(?!acme-challenge|pki-validation) {
|
||||||
|
return 301 /nextcloud/index.php$request_uri;
|
||||||
|
}
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nextcloud/" = {
|
||||||
|
priority = 9999;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
proxy_set_header X-Forwarded-Proto http;
|
||||||
|
proxy_pass http://127.0.0.1:8066/; # tailing / is important!
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_redirect off;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ in
|
|||||||
"tent-gitlab-runner-pm-docker-token.age".publicKeys = tent;
|
"tent-gitlab-runner-pm-docker-token.age".publicKeys = tent;
|
||||||
"tent-gitlab-runner-pm-shell-token.age".publicKeys = tent;
|
"tent-gitlab-runner-pm-shell-token.age".publicKeys = tent;
|
||||||
"tent-gitlab-runner-bsc-docker-token.age".publicKeys = tent;
|
"tent-gitlab-runner-bsc-docker-token.age".publicKeys = tent;
|
||||||
|
"tent-nextcloud-admin-pass.age".publicKeys = tent;
|
||||||
"vpn-dac-login.age".publicKeys = tent;
|
"vpn-dac-login.age".publicKeys = tent;
|
||||||
"vpn-dac-client-key.age".publicKeys = tent;
|
"vpn-dac-client-key.age".publicKeys = tent;
|
||||||
|
|
||||||
|
|||||||
BIN
secrets/tent-nextcloud-admin-pass.age
Normal file
BIN
secrets/tent-nextcloud-admin-pass.age
Normal file
Binary file not shown.
Reference in New Issue
Block a user