sneeuwvlok/modules/nixos/services/development/forgejo/runners/default.nix
Chris Kruining 40cd9d3745
Some checks failed
Test action / Print hello world (push) Failing after 26s
is it podman that needs the kvm?
2025-09-04 14:56:44 +02:00

41 lines
No EOL
711 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 = ''
#!${stdenv.shell}
${dockerTools.shadowSetup}
groupadd -r runner
useradd -r -g runner -d /data -M runner
mkdir /data
chown runner:runner /data
'';
config = {
# User = "root";
Cmd = [ "${lib.getExe bashInteractive}" ];
WorkingDir = "/data";
Volumes = {
"/data" = {};
};
};
}