lol

Ensure that the home directory exists even if the user already exists

+5 -5
+5 -5
nixos/modules/config/update-users-groups.pl
··· 174 174 } elsif (defined $u->{initialHashedPassword}) { 175 175 $u->{hashedPassword} = $u->{initialHashedPassword}; 176 176 } 177 + } 177 178 178 - # Create a home directory. 179 - if ($u->{createHome}) { 180 - make_path($u->{home}, { mode => 0700 }) if ! -e $u->{home}; 181 - chown $u->{uid}, $u->{gid}, $u->{home}; 182 - } 179 + # Create a home directory. 180 + if ($u->{createHome} && ! -e $u->{home}) { 181 + make_path($u->{home}, { mode => 0700 }) if ! -e $u->{home}; 182 + chown $u->{uid}, $u->{gid}, $u->{home}; 183 183 } 184 184 185 185 if (defined $u->{passwordFile}) {