nixos-config/hosts/voyager/services/code-server.nix

20 lines
501 B
Nix

{ 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" = {
forceSSL = true;
sslCertificateKey = "/etc/ssl-snakeoil/code_home_feal_no.key";
sslCertificate = "/etc/ssl-snakeoil/code_home_feal_no.crt";
locations."/" = {
proxyPass = "http://${cfg.host}:${toString cfg.port}";
proxyWebsockets = true;
};
};
}