diff --git a/.gitignore b/.gitignore
index af63e5f5e98320a5af3dd816573f251ccd2a0488..76830613cc87f6a667140bd587bd123d2e6b7119 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 dist-newstyle/*
 .stack-work
 walint.cabal
+result*
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..deea282975955d962dc1509da5d21af74f8e24c9
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,42 @@
+let
+  sources = import ./nix/sources.nix {};
+  haskellNix = import sources.haskellNix {};
+
+  # Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
+  pkgs = import
+    # use haskell.nix's nixpkgs, which may (?) have more substitutes available
+    haskellNix.sources.nixpkgs-unstable
+    # args for nixpkgs; includes the haskell.nix overlay
+    (haskellNix.nixpkgsArgs // { system = "x86_64-linux"; });
+
+  drvs = pkgs.haskell-nix.project {
+   # 'cleanGit' cleans a source directory based on the files known by git
+   src = pkgs.haskell-nix.haskellLib.cleanGit {
+     src = ./.;
+     name = "walint";
+   };
+   modules = [{
+     packages.walint.components.exes = {
+       # don't include gcc or ghc in the dependency closure …
+       walint-server.dontStrip = false;
+       walint.dontStrip = false;
+     };
+   }];
+   stack-sha256 = "16ilij2cygmwbdmjdzj6yl4yv7zi4qzwg7rxkxgp0hbjpkz6n42y";
+  };
+in
+{
+  walint = drvs.walint.components.exes.walint;
+  walint-server = pkgs.stdenvNoCC.mkDerivation {
+    name = "walint-server-with-assets";
+    src = drvs.walint.components.exes.walint-server;
+    phases = [ "buildPhase" ];
+    buildPhase = ''
+      mkdir -p $out
+      cp -r $src/* $out
+      cp -r ${pkgs.copyPathToStore ./static} $out/static
+      cp ${pkgs.copyPathToStore ./config.json} $out/config.json
+      cp ${pkgs.copyPathToStore ./config.toml} $out/config.toml
+    '';
+  };
+}
diff --git a/nix/sources.json b/nix/sources.json
index 991e7777ce1a9f44b7ce348c69ead9783aa23572..f9b2708b118a922cd30e2726e3bc979e8d77252b 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -1,4 +1,16 @@
 {
+    "haskellNix": {
+        "branch": "master",
+        "description": "Alternative Haskell Infrastructure for Nixpkgs",
+        "homepage": "https://input-output-hk.github.io/haskell.nix",
+        "owner": "input-output-hk",
+        "repo": "haskell.nix",
+        "rev": "c2677deef14f2772110f56b60d74dee25f19902f",
+        "sha256": "0pa5n8lgq2hmsskyd7m4xsfiinq8mfpgw7g7ll3j77l5z4shi264",
+        "type": "tarball",
+        "url": "https://github.com/input-output-hk/haskell.nix/archive/c2677deef14f2772110f56b60d74dee25f19902f.tar.gz",
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+    },
     "niv": {
         "branch": "master",
         "description": "Easy dependency management for Nix projects",
diff --git a/stack.yaml b/stack.yaml
index 428eea38240ce7d79a6417572f4feab37a3a50c4..fb24c0693ac249bd10ba33d475a306d677f5cf2d 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,5 +1,4 @@
-resolver:
-  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/16.yaml
+resolver: lts-18.16
 
 # User packages to be built.
 # Various formats can be used as shown in the example below.
diff --git a/stack.yaml.lock b/stack.yaml.lock
index 93443e43ebc475d7515818988e690b60a6b2e4e0..9f568e86d1fb476befc504f249274f9c9ab7182c 100644
--- a/stack.yaml.lock
+++ b/stack.yaml.lock
@@ -86,5 +86,4 @@ snapshots:
     size: 586286
     url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/16.yaml
     sha256: cdead65fca0323144b346c94286186f4969bf85594d649c49c7557295675d8a5
-  original:
-    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/16.yaml
+  original: lts-18.16