Files
ci-images/img/builder.nix
T

63 lines
914 B
Nix
Raw Normal View History

2025-11-25 22:42:47 -06:00
{
2025-12-29 19:47:30 -06:00
buildah,
2025-11-25 22:42:47 -06:00
git,
2026-01-22 23:52:55 -06:00
lib',
2025-11-25 22:42:47 -06:00
nix,
nix-output-monitor,
2026-01-23 00:13:46 -06:00
nodejs_24,
2025-11-25 22:42:47 -06:00
pkgs,
podman,
2026-01-22 23:52:55 -06:00
writeTextFile,
2025-11-25 22:42:47 -06:00
name,
...
}:
let
policy = (
2026-01-22 23:52:55 -06:00
writeTextFile {
2025-11-25 22:42:47 -06:00
name = "policy.json";
text = ''
{
"default": [{"type": "insecureAcceptAnything"}]
}
'';
destination = "/etc/containers/policy.json";
}
);
2026-01-22 23:52:55 -06:00
nix-conf = writeTextFile {
name = "nix.conf";
2025-11-25 22:42:47 -06:00
text = ''
2026-01-22 23:52:55 -06:00
experimental-features = nix-command flakes
2025-11-25 22:42:47 -06:00
'';
2026-01-22 23:52:55 -06:00
destination = "/etc/nix/nix.conf";
2025-11-25 22:42:47 -06:00
};
in
2026-01-22 23:52:55 -06:00
lib'.mkImage pkgs {
2025-11-25 22:42:47 -06:00
name = name "builder";
2026-01-22 23:52:55 -06:00
copyToRoot = pkgs.buildEnv {
name = "policy";
paths = [
policy
nix-conf
2025-11-25 22:42:47 -06:00
];
};
2026-01-22 23:52:55 -06:00
initializeNixDatabase = true;
layers = [
{
deps = [
buildah
git
nix
nix-output-monitor
podman
policy
];
}
2026-01-23 00:13:46 -06:00
{
deps = [
nodejs_24
];
}
2026-01-22 23:52:55 -06:00
];
}