diff --git a/.cargo/config.toml b/.cargo/config.toml
index 7f193ac..5903a40 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -4,3 +4,7 @@ xtask = "run --package xtask --quiet --"
 [profile.dev]
 debug = 0
 strip = "debuginfo"
+
+[target.x86_64-unknown-linux-gnu]
+linker = "clang"
+rustflags = ["-C", "link-arg=-fuse-ld=mold", "-C", "target-cpu=native"]
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..55cd00f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,9 +38,6 @@
                 "rust-analyzer"
                 "rust-src"
               ];
-              targets = [
-                "x86_64-unknown-linux-gnu"
-              ];
             };
           })
         ];
@@ -67,14 +64,13 @@
 
           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
+          ];
         };
 
         buildCrate =
@@ -180,7 +176,8 @@
               sqls
               sqlx-cli
               watchexec
-            ];
+            ]
+            ++ commonArgs.buildInputs;
           RUST_BACKTRACE = 1;
           RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc; # Required for rust-analyzer
         };
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"] }