containers: use native systemd FUSE support

Since version 257 (NixOS 25.05), systemd-nspawn automatically creates a
/dev/fuse node in the container when the host's FUSE node is accessible
to the nspawn process:
https://github.com/systemd/systemd/pull/34067
This commit is contained in:
Erik Arvstedt
2025-12-27 12:40:53 +01:00
parent 53104f55f9
commit 72e220d998
-4
View File
@@ -68,15 +68,11 @@ let
# Enable FUSE inside the container when clightning replication # Enable FUSE inside the container when clightning replication
# is enabled. # is enabled.
# TODO-EXTERNAL: Remove this when
# https://github.com/systemd/systemd/issues/17607
# has been resolved. This will also improve security.
( (
let let
s = config.config.services; s = config.config.services;
in in
lib.mkIf (s ? clightning && s.clightning.enable && s.clightning.replication.enable) { lib.mkIf (s ? clightning && s.clightning.enable && s.clightning.replication.enable) {
bindMounts."/dev/fuse" = { hostPath = "/dev/fuse"; };
allowedDevices = [ { node = "/dev/fuse"; modifier = "rw"; } ]; allowedDevices = [ { node = "/dev/fuse"; modifier = "rw"; } ];
} }
) )