feat: add rstudio.beta.rz.ens.wtf basic features

This commit is contained in:
Raito Bezarius 2022-08-17 18:06:26 +02:00
parent 7f5f3213ac
commit 86de42442d
3 changed files with 36 additions and 0 deletions

View file

@ -70,6 +70,7 @@ dualstack // {
};
docs = public-cof-ips;
jurisprudens = public-cof-ips;
rstudio = public-cof-ips;
};
};

View file

@ -11,6 +11,7 @@
./monitoring.nix
./nextcloud.nix
./minecraft.nix
./rstudio-server
./nur.nix
# ./factorio.nix # TODO
./nginx.nix

View file

@ -0,0 +1,34 @@
{ pkgs, ... }:
let
port = 19000;
in
{
services.rstudio-server = {
enable = true;
rserverExtraConfig = ''
www-port = ${toString port}
'';
package = pkgs.rstudioServerWrapper.override {
packages = with pkgs.rPackages; [
ggplot2
rmarkdown
dplyr
];
};
};
users.users.ruser = {
isNormalUser = true;
hashedPassword = "$6$pTXXVh8NfE.M8VPc$q0fFh3Y7Y0DauLCcZLgJzFciq1wkjoHmO61XpOrZLH3a1M32ZzOMbjx2XMm2QxrUncbx6hGerY/lD8rQ8InS4.";
};
services.nginx.virtualHosts."rstudio.beta.rz.ens.wtf" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
proxyWebsockets = true;
};
};
}