nixos/users-group: Add 'homeMode' option.

This commit is contained in:
Federico Beffa 2022-04-10 21:06:19 +02:00
parent 9bce1fb5ac
commit 9fc01af1cc
4 changed files with 37 additions and 2 deletions

View file

@ -226,7 +226,7 @@ foreach my $u (@{$spec->{users}}) {
if ($u->{createHome}) {
make_path($u->{home}, { mode => 0700 }) if ! -e $u->{home} and ! $is_dry;
chown $u->{uid}, $u->{gid}, $u->{home};
chmod 0700, $u->{home};
chmod oct($u->{homeMode}), $u->{home};
}
if (defined $u->{passwordFile}) {