sneeuwvlok/modules/nixos/services/development/forgejo/runners/default.nix
Chris Kruining 237d208e93
Some checks failed
Test action / Print hello world (push) Failing after 29s
siiiiigh
2025-09-04 15:28:59 +02:00

40 lines
No EOL
691 B
Nix

{
pkgs ? import <nixpkgs> {},
pkgs_linux ? import <nixpkgs> { system = "x86_64-linux"; },
}:
with pkgs;
dockerTools.buildImage {
name = "default";
tag = "latest";
copyToRoot = buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [
coreutils
u-root-cmds
bash
nix
nodejs
podman
];
};
runAsRoot = ''
#!${lib.getExe bashInteractive}
groupadd -r runner
useradd -r -g runner -d /data -M runner
mkdir /data
chown runner:runner /data
'';
config = {
User = "runner";
Cmd = [ "${lib.getExe bashInteractive}" ];
WorkingDir = "/data";
Volumes = {
"/data" = {};
};
};
}