2020-07-16 19:32:30 +00:00
|
|
|
{ system ? builtins.currentSystem }:
|
2020-02-07 22:49:04 +00:00
|
|
|
|
2020-02-13 22:45:21 +00:00
|
|
|
let
|
|
|
|
sources = import ./nix/sources.nix;
|
2020-07-16 19:32:30 +00:00
|
|
|
pkgs = import sources.nixpkgs { inherit system; };
|
|
|
|
callPackage = pkgs.lib.callPackageWith pkgs;
|
|
|
|
site = callPackage ./site.nix { };
|
|
|
|
|
|
|
|
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
|