diff --git a/Cargo.lock b/Cargo.lock
index 329f716..8885015 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1161,7 +1161,6 @@ dependencies = [
  "clap",
  "dropshot",
  "http",
- "openssl",
  "schemars",
  "serde",
  "slog",
@@ -1906,15 +1905,6 @@ version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
 
-[[package]]
-name = "openssl-src"
-version = "300.4.1+3.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c"
-dependencies = [
- "cc",
-]
-
 [[package]]
 name = "openssl-sys"
 version = "0.9.104"
@@ -1923,7 +1913,6 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
 dependencies = [
  "cc",
  "libc",
- "openssl-src",
  "pkg-config",
  "vcpkg",
 ]
diff --git a/flake.nix b/flake.nix
index c47f31d..e6672ae 100644
--- a/flake.nix
+++ b/flake.nix
@@ -58,23 +58,29 @@
           ];
         };
 
+        cleanSrc = craneLib.cleanCargoSource ../.;
+
         commonArgs = {
-          inherit src;
+          inherit src cleanSrc;
 
           stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv;
           strictDeps = true;
           cargoArtifacts = craneLib.buildDepsOnly commonArgs;
 
           nativeBuildInputs = with pkgs; [
-            clang
-            glibc.static
-            mold-wrapped
             pkg-config
           ];
 
-          # CARGO_BUILD_TARGET = "x86_64-unknown-linux-gnu";
-          # CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static";
-          # OPENSSL_STATIC = "true";
+          BuildInputs = with pkgs; [
+            openssl
+          ];
+
+          CARGO_BUILD_TARGET = "x86_64-unknown-linux-gnu";
+          CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static";
+          OPENSSL_STATIC = "true";
+          OPENSSL_DIR = "${pkgs.openssl.dev}";
+          OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
+          OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include/";
         };
 
         buildCrate =
diff --git a/hostd/Cargo.toml b/hostd/Cargo.toml
index fa91683..f3322c7 100644
--- a/hostd/Cargo.toml
+++ b/hostd/Cargo.toml
@@ -21,4 +21,3 @@ serde.workspace = true
 http.workspace = true
 zbus_systemd = { version = "0.25701.0", features = ["hostname1", "sysupdate1", "network1", "portable1", "resolve1", "systemd1"] }
 zbus = "5.4.0"
-openssl = { version = "0.10.63", features = ["vendored"] }