nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 257730ef77358708c4c3dc973adf0fc0d3b4f27c
parent 0efca57f5ada49e60bca63338c195a5ecdabe048
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 17 Mar 2021 02:59:48 +0300

Add docker-agate

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/images/agate/default.nix | 23+++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -206,6 +206,7 @@ lib.makeScope newScope ( ### IMAGES dockerImages = { + agate = callPackage ./images/agate { }; elevation_server = callPackage ./images/elevation_server { }; git = callPackage ./images/git { git = pkgs.gitMinimal.override { diff --git a/pkgs/images/agate/default.nix b/pkgs/images/agate/default.nix @@ -0,0 +1,23 @@ +{ dockerTools, agate, domain ? "localhost" }: +let + key = "/certs/${domain}.key"; + cert = "/certs/${domain}.crt"; +in +dockerTools.buildImage { + name = "agate"; + tag = agate.version; + + contents = [ agate ]; + runAsRoot = "mkdir -p /certs /gemini"; + + config = { + Cmd = [ "agate" "--content" "/gemini" "--key" key "--cert" cert "--hostname" domain ]; + Volumes = { + "/certs" = { }; + "/gemini" = { }; + }; + ExposedPorts = { + "1965/tcp" = { }; + }; + }; +}