2.home-manager/tests/modules/programs/rclone
jiezhuzzz 93b932fdbb rclone: extend mount unit PATH for non-NixOS fusermount
The mount user-service set Environment=PATH=/run/wrappers/bin, which is
a NixOS-only directory. On standalone home-manager hosts running other
Linux distros the directory does not exist, and because Environment=PATH=
replaces systemd's inherited PATH, the resulting unit has no usable PATH
at all.

libfuse falls back to a hardcoded /usr/bin/fusermount3 lookup so the
helper still executes, but the eventual mount(2) syscall returns EPERM,
likely because libfuse's internal system()/popen() invocations into
mount.fuse3 fail without /bin/sh and friends on PATH. Empirically, the
EPERM goes away the moment PATH is widened to include standard Linux
locations.

Enumerate /run/wrappers/bin and /run/current-system/sw/bin alongside the
usual /usr/{local/,}{s,}bin and /{s,}bin entries. Path search order is
preserved, so the NixOS wrappers still win where they exist, and
fusermount/fusermount3 is found at /usr/bin on Ubuntu/Debian/Fedora and
similar distros.
2026-05-19 12:37:34 -05:00
..
basic-configuration.nix rclone tests: cross-platform basic-configuration gating 2026-05-19 12:37:34 -05:00
default.nix rclone tests: add Darwin serve sidecar test 2026-05-19 12:37:34 -05:00
mount-service-generation-darwin.nix rclone: add launchd mount/serve sidecar agents for Darwin 2026-05-19 12:37:34 -05:00
mount-service-generation.nix rclone: extend mount unit PATH for non-NixOS fusermount 2026-05-19 12:37:34 -05:00
serve-service-generation-darwin.nix rclone tests: add Darwin serve sidecar test 2026-05-19 12:37:34 -05:00
serve-service-generation.nix rclone: add serve options 2026-05-02 22:57:24 -05:00