chore: Add personal website

This commit is contained in:
Tera << 8 2025-05-06 22:06:41 -04:00
parent 55322df678
commit 7b5263676f
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
3 changed files with 66 additions and 1 deletions

View file

@ -15,9 +15,10 @@ This is a work-in-progress and currently is not production ready. Please check b
- [x] Configure NFS mount
- [x] Configure Traefik & its dashboard
- [x] Configure Caddy for internal service port forwarding (difficult!)
- [ ] Install Tailscale
- [ ] Install Portainer for other servers & basic admin tasks
- [ ] Install Forgejo
- [ ] Install Personal Website
- [x] Install Personal Website
- [ ] Install Passbolt
- [ ] Install Pterodactyl Panel
- [ ] Install Immich

View file

@ -18,6 +18,7 @@
# Docker stacks
./stacks/traefik/docker-compose.nix
./stacks/caddy/docker-compose.nix
./stacks/terah.dev/docker-compose.nix
];
users.mutableUsers = false;

View file

@ -0,0 +1,63 @@
# Auto-generated using compose2nix v0.3.1.
{ pkgs, lib, ... }:
{
# Containers
virtualisation.oci-containers.containers."terahdev-web" = {
image = "ghcr.io/imterah/personal-www:v1.0.2";
labels = {
"traefik.http.routers.terahdev.rule" = "Host(`terah.dev`) || Host(`www.terah.dev`)";
};
log-driver = "journald";
extraOptions = [
"--network-alias=web"
"--network=terahdev_default"
];
};
systemd.services."docker-terahdev-web" = {
serviceConfig = {
Restart = lib.mkOverride 90 "on-failure";
RestartMaxDelaySec = lib.mkOverride 90 "1m";
RestartSec = lib.mkOverride 90 "100ms";
RestartSteps = lib.mkOverride 90 9;
};
after = [
"docker-network-terahdev_default.service"
];
requires = [
"docker-network-terahdev_default.service"
];
partOf = [
"docker-compose-terahdev-root.target"
];
wantedBy = [
"docker-compose-terahdev-root.target"
];
};
# Networks
systemd.services."docker-network-terahdev_default" = {
path = [ pkgs.docker ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStop = "docker network rm -f terahdev_default";
};
script = ''
docker network inspect terahdev_default || docker network create terahdev_default
'';
partOf = [ "docker-compose-terahdev-root.target" ];
wantedBy = [ "docker-compose-terahdev-root.target" ];
};
# Root service
# When started, this will automatically create all resources and start
# the containers. When stopped, this will teardown all resources.
systemd.targets."docker-compose-terahdev-root" = {
unitConfig = {
Description = "Root target generated by compose2nix.";
};
wantedBy = [ "multi-user.target" ];
};
}