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.
This commit is contained in:
Nick Cao
2026-05-02 08:45:24 -04:00
parent 91045aadd9
commit 636a10cd9b
+2 -2
View File
@@ -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;