2021-01-01 21:24:41 +00:00
|
|
|
{ system ? builtins.currentSystem }:
|
|
|
|
|
|
|
|
let
|
|
|
|
sources = import ./nix/sources.nix;
|
|
|
|
pkgs = import sources.nixpkgs { inherit system; };
|
|
|
|
callPackage = pkgs.lib.callPackageWith pkgs;
|
2021-01-01 21:30:18 +00:00
|
|
|
site = callPackage ./default.nix { };
|
2021-01-01 21:24:41 +00:00
|
|
|
|
|
|
|
dockerImage = pkg:
|
|
|
|
pkgs.dockerTools.buildLayeredImage {
|
|
|
|
name = "xena/christinewebsite";
|
|
|
|
tag = "latest";
|
|
|
|
|
|
|
|
contents = [ pkgs.cacert pkg ];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
Cmd = [ "${pkg}/bin/xesite" ];
|
|
|
|
Env = [ "CONFIG_FNAME=${pkg}/config.dhall" "RUST_LOG=info" ];
|
|
|
|
WorkingDir = "/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in dockerImage site
|