Back to just dockerTools
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
Build images / Build (bitwarden) (push) Failing after 27s
Build images / Build (immich) (push) Failing after 2s
Build images / Build (sword-container-builder) (push) Failing after 2s
Build images / Build (builder) (push) Failing after 2s
Build images / Build (vm-test) (push) Failing after 2s
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
Build images / Build (bitwarden) (push) Failing after 27s
Build images / Build (immich) (push) Failing after 2s
Build images / Build (sword-container-builder) (push) Failing after 2s
Build images / Build (builder) (push) Failing after 2s
Build images / Build (vm-test) (push) Failing after 2s
This commit is contained in:
Generated
+5
-39
@@ -18,35 +18,18 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix2container": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767430085,
|
|
||||||
"narHash": "sha256-SiXJ6xv4pS2MDUqfj0/mmG746cGeJrMQGmoFgHLS25Y=",
|
|
||||||
"owner": "nlewo",
|
|
||||||
"repo": "nix2container",
|
|
||||||
"rev": "66f4b8a47e92aa744ec43acbb5e9185078983909",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nlewo",
|
|
||||||
"repo": "nix2container",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767028467,
|
"lastModified": 1763934636,
|
||||||
"narHash": "sha256-7G+2aXClSMaTY1ogpX14CAxjRsvyVzpE0GRwL71WO7g=",
|
"narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1cabc318c11299f07ca53e3cb719854682fe6eb3",
|
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -66,27 +49,10 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1763934636,
|
|
||||||
"narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nix2container": "nix2container",
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
description = "Standard images that Greg wants to build";
|
description = "Standard images that Greg wants to build";
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nix2container.url = "github:nlewo/nix2container";
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -29,8 +28,7 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lib' = import ./lib.nix {
|
lib' = import ./lib.nix {
|
||||||
inherit (inputs.nix2container.packages.${system}) nix2container;
|
inherit pkgs;
|
||||||
inherit (pkgs) lib;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
+10
-32
@@ -24,39 +24,17 @@ let
|
|||||||
destination = "/etc/containers/policy.json";
|
destination = "/etc/containers/policy.json";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
nix-conf = writeTextFile {
|
|
||||||
name = "nix.conf";
|
|
||||||
text = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
destination = "/etc/nix/nix.conf";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
lib'.mkImage pkgs {
|
lib'.mkImage {
|
||||||
name = name "builder";
|
name = name "builder";
|
||||||
copyToRoot = pkgs.buildEnv {
|
contents = [
|
||||||
name = "policy";
|
buildah
|
||||||
paths = [
|
git
|
||||||
policy
|
nix
|
||||||
nix-conf
|
nix-output-monitor
|
||||||
];
|
nodejs_24
|
||||||
};
|
podman
|
||||||
initializeNixDatabase = true;
|
policy
|
||||||
layers = [
|
|
||||||
{
|
|
||||||
deps = [
|
|
||||||
buildah
|
|
||||||
git
|
|
||||||
nix
|
|
||||||
nix-output-monitor
|
|
||||||
podman
|
|
||||||
policy
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
deps = [
|
|
||||||
nodejs_24
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
includeNixDB = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +1,30 @@
|
|||||||
{ nix2container, lib, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
rec {
|
{
|
||||||
baseImage =
|
basePackages = with pkgs; rec {
|
||||||
pkgs:
|
copyToRoot = paths;
|
||||||
mkImage {
|
paths = [
|
||||||
inherit pkgs;
|
bashInteractive
|
||||||
name = "src.thehellings.com/greg/base";
|
cacert
|
||||||
};
|
coreutils-full
|
||||||
|
dockerTools.binSh
|
||||||
baseLayer =
|
dockerTools.caCertificates
|
||||||
pkgs: with pkgs; rec {
|
dockerTools.shadowSetup
|
||||||
copyToRoot = deps;
|
dockerTools.usrBinEnv
|
||||||
deps = [
|
findutils
|
||||||
(pkgs.buildEnv {
|
gnugrep
|
||||||
name = "base-env";
|
gnused
|
||||||
paths = [
|
];
|
||||||
bashInteractive
|
};
|
||||||
cacert
|
|
||||||
coreutils-full
|
|
||||||
dockerTools.binSh
|
|
||||||
dockerTools.caCertificates
|
|
||||||
dockerTools.shadowSetup
|
|
||||||
dockerTools.usrBinEnv
|
|
||||||
findutils
|
|
||||||
gnugrep
|
|
||||||
gnused
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
foldLayers =
|
|
||||||
let
|
|
||||||
merge =
|
|
||||||
parents: current:
|
|
||||||
let
|
|
||||||
layer = nix2container.buildLayer (
|
|
||||||
current
|
|
||||||
// {
|
|
||||||
layers = parents;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
in
|
|
||||||
parents ++ [ layer ];
|
|
||||||
in
|
|
||||||
layers: lib.foldl merge [ ] layers;
|
|
||||||
|
|
||||||
mkImage =
|
mkImage =
|
||||||
pkgs: config:
|
options:
|
||||||
let
|
pkgs.dockerTools.buildLayeredImage (
|
||||||
base = baseLayer pkgs;
|
pkgs.lib.mergeAttrs {
|
||||||
path = pkgs.lib.makeBinPath (base.deps ++ lib.flatten (builtins.map (e: e.deps) config.layers));
|
|
||||||
in
|
|
||||||
nix2container.buildImage (
|
|
||||||
(lib.mergeAttrs {
|
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
config = {
|
config = {
|
||||||
Env = [
|
|
||||||
"PATH=${path}"
|
|
||||||
"USER=nobody"
|
|
||||||
];
|
|
||||||
Cmd = [ "${pkgs.bashInteractive}/bin/bash" ];
|
Cmd = [ "${pkgs.bashInteractive}/bin/bash" ];
|
||||||
};
|
};
|
||||||
} config)
|
} options
|
||||||
// {
|
|
||||||
layers = foldLayers ([ base ] ++ config.layers);
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user