mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
pureintent: use nginx as proxy
This commit is contained in:
parent
b0882c4ab6
commit
c7442dfa27
1 changed files with 22 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ flake, pkgs, ... }:
|
||||
{ flake, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (flake) inputs;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue