diff --git a/.forgejo/workflows/runner-image.yml b/.forgejo/workflows/runner-image.yml index 3aaa967..724b8f1 100644 --- a/.forgejo/workflows/runner-image.yml +++ b/.forgejo/workflows/runner-image.yml @@ -59,6 +59,7 @@ jobs: - name: Push image run: >- podman push + --auth-file=${XDG_RUNTIME_DIR}/containers/auth.json& --creds="${{ forge.actor }}:${{ forge.token }}" localhost/default:latest ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} \ No newline at end of file diff --git a/modules/nixos/services/development/forgejo/runners/default.nix b/modules/nixos/services/development/forgejo/runners/default.nix index 8b9355e..1308408 100644 --- a/modules/nixos/services/development/forgejo/runners/default.nix +++ b/modules/nixos/services/development/forgejo/runners/default.nix @@ -3,11 +3,35 @@ pkgs_linux ? import { system = "x86_64-linux"; }, }: -pkgs.dockerTools.buildImage { +with pkgs; +dockerTools.buildImage { name = "default"; tag = "latest"; + contents = [ + coreutils + u-root-cmds + bash + nix + nodejs + podman + ]; + + runAsRoot = '' + #!${stdenv.shell} + ${dockerTools.shadowSetup} + groupadd -r runner + useradd -r -g runner -d /data -M runner + mkdir /data + chown runner:runner /data + ''; + config = { - Cmd = [ "${pkgs_linux.hello}/bin/hello" ]; + # User = "root"; + Cmd = [ "${lib.getExe bashInteractive}" ]; + WorkingDir = "/data"; + Volumes = { + "/data" = {}; + }; }; } \ No newline at end of file