Skip to content

Commit

Permalink
pureintent: use nginx as proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Mar 3, 2025
1 parent b0882c4 commit c7442df
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions configurations/nixos/pureintent/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ flake, pkgs, ... }:
{ flake, pkgs, lib, ... }:

let
inherit (flake) inputs;
Expand All @@ -21,8 +21,28 @@ in
enable = true;
package = pkgs.netdataCloud;
};
services.nginx = {
enable = true;
virtualHosts."pureintent" =
let
apps = {
vira = {
baseUrlPrefix = "vira";
port = 5005;
};
};
in
{
locations = lib.mapAttrs'
(name: value: lib.nameValuePair "/${value.baseUrlPrefix}/" {
proxyPass = "http://localhost:${builtins.toString value.port}/";
proxyWebsockets = true;
})
apps;
};
};
networking.firewall.allowedTCPPorts = [
5005 # vira
80
];

programs.nix-ld.enable = true; # for vscode server
Expand Down

0 comments on commit c7442df

Please sign in to comment.