[nix] Modularized the container backend so I can easily switch it with an option

This commit is contained in:
2025-06-24 17:31:30 -07:00
parent c74e40e69e
commit f4dd4583db
10 changed files with 158 additions and 117 deletions

View File

@@ -1,14 +1,14 @@
{ config, ... }:
let
let
inherit (import ./lib.nix config) mkContainer blazestar;
in
{
sops.secrets = {
"gitea/db_password" = {
restartUnits = [ "podman-gitea.service" ];
restartUnits = [ "${config.local.container-backend}-gitea.service" ];
};
"gitea/registration_token" = {
restartUnits = [ "podman-gitea-runner.service" ];
restartUnits = [ "${config.local.container-backend}-gitea-runner.service" ];
};
};
@@ -66,7 +66,7 @@ in
];
volumes = [
# The runner will spawn new containers to run the actions
"/var/run/podman/podman.sock:/var/run/docker.sock:ro"
"${config.local.container-socket}:/var/run/docker.sock:ro"
];
};
}