{ config, pkgs, domain, ... }: { imports = [ # Note: 'domain' is made available via _module.args in the machine's configuration.nix # It's passed to this module and propagated to all imports automatically /var/src/config-nginx /var/src/config-pict-rs /var/src/config-lnbits ]; # Set hostname (replace dots with hyphens, e.g., "demo.ariege.io" → "demo-ariege-io") networking.hostName = builtins.replaceStrings ["."] ["-"] domain; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # 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"; }