mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-05-20 05:12:34 +02:00
New way to deploy apps in my server
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
# Cyberchef is a web app for analyzing and decoding data.
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (import ./mk-container.nix { inherit lib config; }) mkContainer;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
nginx.virtualHosts."cyberchef.local" = {
|
||||
root = "${pkgs.cyberchef}/share/cyberchef";
|
||||
listen = [
|
||||
{
|
||||
addr = "127.0.0.1";
|
||||
port = 8754;
|
||||
}
|
||||
];
|
||||
};
|
||||
cloudflared.tunnels."${config.var.tunnelId}".ingress."cyberchef.${config.var.domain}" = "http://localhost:8754";
|
||||
};
|
||||
imports = [
|
||||
(mkContainer {
|
||||
name = "cyberchef";
|
||||
hostIp = "10.233.5.1";
|
||||
containerIp = "10.233.5.2";
|
||||
nixosConfig = { pkgs, ... }: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."cyberchef" = {
|
||||
root = "${pkgs.cyberchef}/share/cyberchef";
|
||||
listen = [{ addr = "0.0.0.0"; port = 8080; }];
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
services.cloudflared.tunnels."${config.var.tunnelId}".ingress."cyberchef.${config.var.domain}" = "http://10.233.5.2:8080";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user