35 lines
732 B
Nix
35 lines
732 B
Nix
|
{ 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;
|
||
|
};
|
||
|
};
|
||
|
}
|