headplane_headscale_nix/headplane3.nix.old

33 lines
831 B
Nix

{ config, pkgs, ... }:
let
domain = "kennys.mom";
headplanePort = 3000; # Adjusted to match your configuration
headplaneDir = "/opt/headplane"; # Directory to store the project
configYamlPath = "/etc/headplane/config/headplane.yaml"; # Path to the generated config YAML
headscaleConfigPath = "/var/lib/headscale/config.yaml"; # Default path for Headscale config
cookieSecret = "iQ0bUyaFgwaijWaSyZ1ILA9RwfywrbZ3";
in
{
services = {
headplane = {
enable=true;
};
# NGINX configuration for Headplane
nginx = {
enable = true;
virtualHosts."headplane.${domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString headplanePort}";
proxyWebsockets = true;
};
};
};
};
}