buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
Build images / Build (immich) (push) Successful in 1m1s
Build images / Build (bitwarden) (push) Successful in 3m5s
Build images / Build (builder) (push) Successful in 3m49s
Build images / Build (sword-container-builder) (push) Successful in 5m7s
Build images / Build (vm-test) (push) Successful in 6m54s
75 lines
1.3 KiB
Nix
75 lines
1.3 KiB
Nix
{
|
|
buildah,
|
|
fakeNss,
|
|
git,
|
|
lib,
|
|
lib',
|
|
nix,
|
|
nix-output-monitor,
|
|
nodejs_24,
|
|
podman,
|
|
writeTextFile,
|
|
|
|
name,
|
|
...
|
|
}:
|
|
let
|
|
policy = (
|
|
writeTextFile {
|
|
name = "policy.json";
|
|
text = ''
|
|
{
|
|
"default": [{"type": "insecureAcceptAnything"}]
|
|
}
|
|
'';
|
|
destination = "/etc/containers/policy.json";
|
|
}
|
|
);
|
|
nix-conf = writeTextFile {
|
|
name = "nix.conf";
|
|
text = ''
|
|
extra-experimental-features = nix-command flakes
|
|
'';
|
|
destination = "/etc/nix/nix.conf";
|
|
};
|
|
bashrc = writeTextFile {
|
|
name = "bashrc";
|
|
text = ''
|
|
export PATH=${lib.makeBinPath contents}
|
|
'';
|
|
destination = "/etc/bashrc";
|
|
};
|
|
contents = lib'.basePackages ++ [
|
|
buildah
|
|
(fakeNss.override {
|
|
extraPasswdLines = [
|
|
"nixbld:x:1001:1001:Build user:/home/nixbld:/noshell"
|
|
];
|
|
extraGroupLines = [
|
|
"nixbld:!:1001:nixbld"
|
|
];
|
|
})
|
|
git
|
|
nix
|
|
nix-conf
|
|
nix-output-monitor
|
|
nodejs_24
|
|
podman
|
|
policy
|
|
];
|
|
in
|
|
lib'.mkImage {
|
|
name = name "builder";
|
|
config.Env = [
|
|
"TEMP=/tmp"
|
|
"PATH=${lib.makeBinPath contents}"
|
|
];
|
|
# Set this explicitly so that we avoid infinite recursion
|
|
contents = contents ++ [ bashrc ];
|
|
extraCommands = ''
|
|
mkdir -p tmp
|
|
mkdir -p var/tmp
|
|
'';
|
|
includeNixDB = true;
|
|
}
|