factor out nix code into new files via makeScope
This makes the Nix code a lot easier to reason about.
This commit is contained in:
committed by
Matthias Ahouansou
parent
c9ee4a920e
commit
3336d3f812
25
nix/pkgs/oci-image/default.nix
Normal file
25
nix/pkgs/oci-image/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
# Keep sorted
|
||||
{ default
|
||||
, dockerTools
|
||||
, lib
|
||||
, tini
|
||||
}:
|
||||
|
||||
dockerTools.buildImage {
|
||||
name = default.pname;
|
||||
tag = "next";
|
||||
copyToRoot = [
|
||||
dockerTools.caCertificates
|
||||
];
|
||||
config = {
|
||||
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT)
|
||||
# are handled as expected
|
||||
Entrypoint = [
|
||||
"${lib.getExe' tini "tini"}"
|
||||
"--"
|
||||
];
|
||||
Cmd = [
|
||||
"${lib.getExe default}"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user