rico2: setup adtya.xyz

This commit is contained in:
Adithya 2023-06-02 12:45:51 +05:30
parent a86dd2d5f1
commit d854bad66c
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
6 changed files with 44 additions and 2 deletions

View file

@ -0,0 +1,14 @@
{...}: {
virtualisation.oci-containers.containers."adtya.xyz" = {
image = "ghcr.io/adtya/adtya.xyz:latest";
ports = ["3000:80"];
};
services.caddy.virtualHosts."adtya.xyz" = {
hostName = "adtya.xyz";
serverAliases = ["www.adtya.xyz" "adtya.xyz"];
extraConfig = ''
reverse_proxy http://127.0.0.1:3000
'';
};
}

View file

@ -0,0 +1,7 @@
{...}: {
imports = [./adtya.xyz.nix];
virtualisation.oci-containers = {
backend = "podman";
};
}

View file

@ -3,6 +3,7 @@
./hardware
./programs
./services
./containers
./security.nix
];

View file

@ -25,5 +25,25 @@ in {
type = tcp
local_port = 22
remote_port = 6002
[http.adtya.xyz]
type = http
custom_domains = adtya.xyz
local_port = 80
[https.adtya.xyz]
type = https
custom_domains = adtya.xyz
local_port = 443
[http.www.adtya.xyz]
type = http
custom_domains = www.adtya.xyz
local_port = 80
[https.www.adtya.xyz]
type = https
custom_domains = www.adtya.xyz
local_port = 443
'';
}