2023-04-19 10:48:16 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.services.code-server;
|
|
|
|
in {
|
|
|
|
services.code-server = {
|
|
|
|
enable = true;
|
|
|
|
host = "127.0.1.2";
|
|
|
|
port = 4444;
|
|
|
|
};
|
|
|
|
services.nginx.virtualHosts."code.home.feal.no" = {
|
2023-04-19 22:18:04 +02:00
|
|
|
forceSSL = true;
|
|
|
|
sslCertificateKey = "/etc/ssl-snakeoil/code_home_feal_no.key";
|
|
|
|
sslCertificate = "/etc/ssl-snakeoil/code_home_feal_no.crt";
|
2023-04-19 10:48:16 +02:00
|
|
|
locations."/" = {
|
2023-04-20 11:54:13 +02:00
|
|
|
proxyPass = "http://${cfg.host}:${toString cfg.port}";
|
2023-04-19 10:48:16 +02:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|