2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-13 16:31:48 +01:00
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;
};
};
}