setup opengist

This commit is contained in:
♥ Minnie ♥ 2025-07-05 20:07:57 +08:00
parent f2d9cfc350
commit 961bfc2afb
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
5 changed files with 68 additions and 0 deletions

View file

@ -9,6 +9,7 @@
./minecraft ./minecraft
./mpd ./mpd
./murmur ./murmur
./opengist
./traefik ./traefik
]; ];
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -0,0 +1,62 @@
{...}: let
port = "6157";
in {
# OpenGist service configuration
virtualisation.oci-containers.containers = {
opengist = {
image = "ghcr.io/thomiceli/opengist:1.10";
ports = [
"${port}:${port}"
];
volumes = [
"/var/lib/opengist:/opengist"
];
# Environment variables for OpenGist
environment = {
PUID = "1000";
PGID = "100";
# Custom OpenGist configuration
OG_CUSTOM_LOGO = "pikachu.png";
OG_CUSTOM_FAVICON = "pokeball.png";
OG_CUSTOM_NAME = "PokeGist";
# Disable SSH Git support
OG_SSH_GIT_ENABLED = "false";
};
};
};
# Traefik configuration
services.traefik.dynamicConfigOptions.http = {
# OpenGist Router
routers.opengist = {
rule = "Host(`ps7e.xyz`)";
entryPoints = [
"websecure"
];
service = "opengist";
};
# OpenGist Service
services.opengist = {
loadBalancer.servers = [
{url = "http://127.0.0.1:${port}";}
];
};
};
# Persist data for OpenGist
environment.persistence."/persist" = {
directories = [
{
directory = "/var/lib/opengist";
user = "sajenim";
group = "users";
}
];
};
# Activation script to create symlinks for custom assets
system.activationScripts.opengist-symlink = ''
cp ${toString ./assets/pikachu.png} /var/lib/opengist/custom/pikachu.png
cp ${toString ./assets/pokeball.png} /var/lib/opengist/custom/pokeball.png
'';
}

View file

@ -118,6 +118,11 @@
main = "sajkbd.io"; main = "sajkbd.io";
sans = ["*.sajkbd.io"]; sans = ["*.sajkbd.io"];
} }
{
# Pastes
main = "ps7e.xyz";
sans = ["*.ps7e.xyz"];
}
]; ];
}; };
}; };