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
Raw Normal View History

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;
};
};
}