From 64e12f2b22ab1cd79cc413a4e7d52ab2f3109ecf Mon Sep 17 00:00:00 2001 From: tezlm Date: Thu, 12 Sep 2024 23:49:44 -0700 Subject: [PATCH] add oci image to flake --- flake.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 50fe2135..31c96bcf 100644 --- a/flake.nix +++ b/flake.nix @@ -70,8 +70,24 @@ }; in { - packages = { + packages = rec { default = (mkScope pkgs).default; + oci-image = pkgs.dockerTools.buildImage { + name = default.pname; + tag = "next"; + copyToRoot = [ + pkgs.dockerTools.caCertificates + ]; + config = { + # Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT) + # are handled as expected + Entrypoint = [ + "${pkgs.lib.getExe' pkgs.tini "tini"}" + "--" + "${pkgs.lib.getExe default}" + ]; + }; + }; } // builtins.listToAttrs