aboutsummaryrefslogtreecommitdiff
path: root/docker.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-06 00:22:02 +0000
committerFuwn <[email protected]>2021-05-06 00:22:02 +0000
commitcfb54fcd29fb25f12c483897873fb98f85269d3b (patch)
tree564b20278d8125bde58cec07cfe79b4537f37d2b /docker.nix
parentchore(global): create version file (diff)
downloadwhirl-cfb54fcd29fb25f12c483897873fb98f85269d3b.tar.xz
whirl-cfb54fcd29fb25f12c483897873fb98f85269d3b.zip
feat(nix): spice it all up
Diffstat (limited to 'docker.nix')
-rw-r--r--docker.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/docker.nix b/docker.nix
new file mode 100644
index 0000000..2bee934
--- /dev/null
+++ b/docker.nix
@@ -0,0 +1,23 @@
+{ system ? builtins.currentSystem }:
+
+let
+ sources = import ./nix/sources.nix;
+ pkgs = import sources.nixpkgs { };
+ callPackage = pkgs.lib.callPackageWith pkgs;
+ whirl = callPackage ./default.nix { };
+
+ dockerImage = pkg:
+ pkgs.dockerTools.buildLayeredImage {
+ name = "Whirlsplash/whirl";
+ tag = "latest";
+
+ contents = [ pkg ];
+
+ config = {
+ Cmd = [ "/bin/whirl" ];
+ WorkingDir = "/";
+ Env = [ ];
+ };
+ };
+
+in dockerImage whirl