Reverse dependency in the activation script

Hi all

I want to include an activation snippet before the users snippet in the activation script.
I know that there is the deps field, but this can only be used to make sure a snippet is included after another.
I tried to update the deps field of the users snippet, but this didn’t seem to work, the extra dependency that I injected was ignored.

Any pointers on how to do this? How to write an activation snippet and make sure that it appears before the users snippet?

I tried several variations on the following code without success, it seems like the deps lists are not being merged.

system.activationScripts = {
  users.deps = [ "migrate_users" ];

  migrate_users = {
    text = <...>;
    deps = [];


The simple answer is pretty unsatisfying. You cannot change “users.deps” with the option system (there is a fixme about that in the code…). But when the order is not coerced by any dependency, activationScripts will be sorted by name, because all attribute sets are.

So use a name that comes alphabetically before “users”. “__aa__migrate_users” works pretty well, but I am sure you can craft a better one ;).

Not the nicest or most robust approach, but at least it works, thanks!