Skip to content

Installable `/etc/profile.d` activation scripts for use with `flox`

License

Notifications You must be signed in to change notification settings

flox/etc-profiles

Repository files navigation

etc-profiles

Installable /etc/profile.d activation scripts for use with flox

Users can define and install additional scripts in <env>/etc/profile.d as “custom packages”/installables to share common setup processes across environments.

Recommended usage:

# flox.nix
{
  packages.nixpkgs-flox.sqlite = {
    meta.outputsToInstall = ["bin" "out" "dev"];
  };
  packages.nixpkgs-flox.pkg-config = {};
  # Provides `<env>/etc/profile' base.
  packages."github:flox/etc-profiles".etc-profiles = {};

  shell.hook = ''
    [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile";
    pkg-config --list-all >&2;
  '';
}

Available Profile Scripts

  • profile-base is a simple script that will source child scripts located in <env>/etc/profile.d/*.sh.
    • This script is required to run any scripts mentioned later
  • profile-common-paths sets a small set of the most commonly used UNIX *PATH variables.
    • This script is recommended as a member for all profile.d collections.
  • profile-python3 sets PYTHONPATH.
    • Only runs if python3 is in PATH, so it is a sane member of a robust profile.d collection.
  • profile-node sets NODE_PATH.
    • Only runs if node is in PATH, so it is a sane member of a robust profile.d collection.

About

Installable `/etc/profile.d` activation scripts for use with `flox`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published