From 636a10cd9b9329dafc6e86bca8a96ccc478c9d45 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 2 May 2026 08:43:20 -0400 Subject: [PATCH] nixos/nbd: do not daemonize the main process Since https://github.com/NetworkBlockDevice/nbd/commit/da5e07c057abbee8cc4d2beef03952c7a44fd9eb, nbd-server now double forks when daemonize, breaking systemd process tracking. --- nixos/modules/services/networking/nbd.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/nbd.nix b/nixos/modules/services/networking/nbd.nix index 457c423aa89b..054f265f1bbd 100644 --- a/nixos/modules/services/networking/nbd.nix +++ b/nixos/modules/services/networking/nbd.nix @@ -153,8 +153,8 @@ in before = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.nbd}/bin/nbd-server -C ${serverConfig}"; - Type = "forking"; + ExecStart = "${pkgs.nbd}/bin/nbd-server -n -C ${serverConfig}"; + Type = "simple"; DeviceAllow = map (path: "${path} rw") allowedDevices; BindPaths = boundPaths;