From 02b23c7ae51f7c8334b32f3ed3081885f1a71fda Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 6 Jul 2021 20:12:45 +0200 Subject: [PATCH] Add default.nix and docker.nix --- default.nix | 5 +++++ docker.nix | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 default.nix create mode 100644 docker.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..d6b5c26 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }: + +with pkgs; + +poetry2nix.mkPoetryApplication { projectDir = ./.; } diff --git a/docker.nix b/docker.nix new file mode 100644 index 0000000..f7e11aa --- /dev/null +++ b/docker.nix @@ -0,0 +1,14 @@ +{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }: + +with pkgs; + +let locimend = callPackage ./default.nix { }; + +in { + docker = dockerTools.streamLayeredImage { + name = "locimend"; + contents = [ locimend ]; + config.Cmd = [ "api" ]; + }; + +}