add nextcloud to plublic-cof
This commit is contained in:
parent
394ca11d29
commit
1309a9a91e
3 changed files with 64 additions and 0 deletions
5
machines/public-cof/acme.nix
Normal file
5
machines/public-cof/acme.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
{
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.email = "club-reseau@lists.ens.psl.eu";
|
||||
}
|
|
@ -6,7 +6,9 @@
|
|||
./hardware-configuration.nix
|
||||
./programs.nix
|
||||
./system.nix
|
||||
./acme.nix
|
||||
./networking.nix
|
||||
./nextcloud.nix
|
||||
# TODO monitoring
|
||||
];
|
||||
|
||||
|
|
57
machines/public-cof/nextcloud.nix
Normal file
57
machines/public-cof/nextcloud.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
hostName = "nuage.beta.rz.ens.wtf";
|
||||
https = true;
|
||||
|
||||
config = {
|
||||
overwriteProtocol = "https";
|
||||
|
||||
dbtype = "pgsql";
|
||||
dbhost = "/run/postgresql";
|
||||
|
||||
dbpass = "TODO";
|
||||
adminpass = "TODO";
|
||||
|
||||
defaultPhoneRegion = "FR";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
# # Only allow PFS-enabled ciphers with AES256
|
||||
# sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
|
||||
virtualHosts = {
|
||||
"nuage.beta.rz.ens.wtf" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{ name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
}
|
Loading…
Reference in a new issue