1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-28 05:00:58 +01:00

Factor out the generation of the profile/channel directory

Make sure that all the code paths use the same one, and that the
backwards-compatibility measures are probably in place when needed
This commit is contained in:
Théophane Hufschmitt 2023-03-21 13:37:19 +01:00
parent 82bd9535dd
commit fb67c1a1fb
5 changed files with 40 additions and 15 deletions

View file

@ -72,6 +72,15 @@ std::string optimisticLockProfile(const Path & profile);
profiles. */
Path profilesDir();
/* Returns the path to the profile directory for root (but doesn't try creating it) */
Path rootProfilesDir();
/* Creates and returns the path to the file used for storing the users's channels */
Path defaultChannelsDir();
/* Returns the path to the channel directory for root (but doesn't try creating it) */
Path rootChannelsDir();
/* Resolve the default profile (~/.nix-profile by default, $XDG_STATE_HOME/
nix/profile if XDG Base Directory Support is enabled), and create if doesn't
exist */