playbook base initial skeleton

This commit is contained in:
m3tam3re
2025-03-12 14:28:01 +01:00
commit b97263495b
14 changed files with 471 additions and 0 deletions

View File

@ -0,0 +1,9 @@
{
virtualisation.oci-containers.containers.baserow = {
image = "docker.io/baserow/baserow:latest";
environmentFiles = ["/etc/environment-files/baserow.env"];
ports = ["127.0.0.1:3000:80"];
volumes = ["baserow_data:/baserow/data"];
extraOptions = ["--network=web"];
};
}

View File

@ -0,0 +1,3 @@
{
services.caddy.enable = true;
}

28
services/core/default.nix Normal file
View File

@ -0,0 +1,28 @@
{
imports = [
./baserow
./n8n
./portainer
];
virtualisation.oci-containers.backend = "docker";
systemd.services.docker-network-web = {
description = "Create Docker Network Web";
requires = ["docker.service"];
after = ["docker.service"];
wantedBy = ["multi-user.target"];
# Run on startup if network doesn't exist
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
if ! /run/current-system/sw/bin/docker network ls | grep -q 'web'; then
/run/current-system/sw/bin/docker network create web
fi
'';
};
}

9
services/n8n/default.nix Normal file
View File

@ -0,0 +1,9 @@
{
virtualisation.oci-containers.containers.n8n = {
image = "docker.io/n8nio/n8n:latest";
environmentFiles = ["/etc/environment-files/n8n.env"];
ports = ["127.0.0.1:5678:5678"];
volumes = ["n8n_data:/home/node/.n8n"];
extraOptions = ["--network=web"];
};
}

View File

@ -0,0 +1,11 @@
{
virtualisation.oci-containers.containers.portainer = {
image = "docker.io/portainer/portainer-ce:latest";
ports = ["127.0.0.1:9000:9000"];
volumes = [
"/etc/localtime:/etc/localtime:ro"
"/var/run/docker.sock:/var/run/docker.sock:ro"
"portainer_data:/data"
];
};
}