krops-multi-deploy/config/shared.nix
padreug 0c22db4d7b Add LNBits service configuration and Nginx integration
Introduced a new configuration for the LNBits service, enabling it with customizable options such as host, port, and environment variables. The Nginx configuration has been updated to include WebSocket support and proxy settings for LNBits, ensuring secure and efficient handling of requests. This enhances the overall web service management and modularity of the NixOS setup.
2025-10-08 17:50:12 +02:00

40 lines
No EOL
746 B
Nix

{ config, pkgs, domain, ... }:
{
imports = [
./nginx.nix
./pict-rs.nix
./modules/lnbits-service.nix
./lnbits.nix
];
# Set hostname (passed as parameter)
networking.hostName = domain;
# System packages
environment.systemPackages = with pkgs; [
vim
git
htop
];
# Enable SSH
services.openssh.enable = true;
# Configure domain-specific virtual hosts
services.nginx.virtualHosts = {
# Web-app service
"app.${domain}" = {
forceSSL = true;
enableACME = true;
root = "/var/src/web-app-dist";
locations."/" = {
index = "index.html";
tryFiles = "$uri $uri/ /index.html";
};
};
};
# NixOS release version
system.stateVersion = "25.05";
}