infrastructure/machines/compute01/rstudio-server.nix

40 lines
836 B
Nix

{ pkgs, ... }:
let
# host = "rstudio.dgnum.eu";
port = 19000;
in
{
services.rstudio-server = {
enable = true;
rserverExtraConfig = ''
www-port = ${builtins.toString port}
'';
package = pkgs.rstudioServerWrapper.override {
packages = with pkgs.rPackages; [
ggplot2
rmarkdown
dplyr
];
};
};
users.users.ruser = {
isNormalUser = true;
hashedPassword = "$6$pTXXVh8NfE.M8VPc$q0fFh3Y7Y0DauLCcZLgJzFciq1wkjoHmO61XpOrZLH3a1M32ZzOMbjx2XMm2QxrUncbx6hGerY/lD8rQ8InS4.";
};
dgn-access-control.users.ruser = [ "jemagius" ];
# services.nginx.virtualHosts.${host} = {
# enableACME = true;
# forceSSL = true;
#
# locations."/" = {
# proxyPass = "http://localhost:${builtins.toString port}";
# proxyWebsockets = true;
# };
# };
}