numtide/system-manager

Possible to link to `/usr/local`?

bryango opened this issue · 4 comments

Is your feature request related to a problem? Please describe.

I understand that package environments are constructed in /run/system-manager/sw and system $PATH is prepended accordingly, as implemented in #17. However, in most (if not all) FHS compliant systems /usr/local is already in $PATH, and is a standard place to put local binaries ("local" in the sense that it's not managed by the distro's package manager).

Describe the solution you'd like

I would like the possibility to:

  • keep /run/system-manager/sw as-is; even if we use /usr/local, the directory /run/system-manager/sw is great to visualize the changes made by system-manager
  • not modify $PATH; maybe this is already possible with environment.etc."profile.d/system-manager-path.sh".enable = false?
  • optionally weave /run/system-manager/sw into /usr/local following FHS, like what has been done already for /etc.

Describe alternatives you've considered

Just live with /run/system-manager/sw and a prepended $PATH.

Additional context

None for now, other than: thank you for providing this wonderful module! 😄

r-vdp commented

What is the exact problem that you are trying to solve with having binaries in /usr/local? What would you be gaining as opposed to the current approach?

What is the exact problem that you are trying to solve with having binaries in /usr/local? What would you be gaining as opposed to the current approach?

Just to (optionally) adhere to FHS, since in practice many third party software might have hard coded paths for binaries / libraries under /usr/. In this way nix packages installed from system-manager may be easily discoverable by such (not so well written) software.

This is only an "enhancement" suggestion though; for now I can live with /run/system-manager/sw so if this is currently out of scope, feel free to close!

but some programs install in /usr/local so that would mean that you can't use some of these certain programs

r-vdp commented

I don't think I'll spend time on this. It would also introduce potential clashes with the distro-provided packages.

Feel free to re-open with a concrete proposal at a later point if you want.