diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-14 22:27:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 22:27:19 +0200 |
commit | 5ee3ee1a6bafa3a1fca5f286388dea58c4a6c402 (patch) | |
tree | 30c1e5af708d99c9482218ab6452207800b57e64 /src/libstore/profiles.hh | |
parent | 2c751c0c002deaad6eccc44dc41ecefb6b93bba3 (diff) | |
parent | b41968f15a6393a55b5c7ff5fe7eac4e33d94357 (diff) |
Merge pull request #5249 from edolstra/nix-profile
Add missing 'nix profile' subcommands
Diffstat (limited to 'src/libstore/profiles.hh')
-rw-r--r-- | src/libstore/profiles.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/profiles.hh b/src/libstore/profiles.hh index be55a65d4..d100c970c 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/profiles.hh @@ -11,7 +11,7 @@ namespace nix { class StorePath; -typedef unsigned int GenerationNumber; +typedef uint64_t GenerationNumber; struct Generation { @@ -46,6 +46,13 @@ void deleteGenerationsOlderThan(const Path & profile, const string & timeSpec, b void switchLink(Path link, Path target); +/* Roll back a profile to the specified generation, or to the most + recent one older than the current. */ +void switchGeneration( + const Path & profile, + std::optional<GenerationNumber> dstGen, + bool dryRun); + /* Ensure exclusive access to a profile. Any command that modifies the profile first acquires this lock. */ void lockProfile(PathLocks & lock, const Path & profile); |