update-users-groups.pl: correctly guard duplicate uids for declarative users

Verified that following nixos configuration:

users.users.foo = {
uid = 1000;
name = "foo";
};
users.users.bar = {
name = "bar";
};

Before this commit both users will get uid of 1000, after it's applied
bar will correctly get 1001.

+2 -2
+2 -2
nixos/modules/config/update-users-groups.pl
··· 52 $gidsUsed{$g->{gid}} = 1 if defined $g->{gid}; 53 } 54 55 - foreach my $u (@{$spec->{groups}}) { 56 - $uidsUsed{$u->{u}} = 1 if defined $u->{uid}; 57 } 58 59 # Read the current /etc/group.
··· 52 $gidsUsed{$g->{gid}} = 1 if defined $g->{gid}; 53 } 54 55 + foreach my $u (@{$spec->{users}}) { 56 + $uidsUsed{$u->{uid}} = 1 if defined $u->{uid}; 57 } 58 59 # Read the current /etc/group.