about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2023-07-01 08:19:44 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-07-13 17:21:36 +0200
commitdf1eee2aa65052a18121ed4971081576b25d6b5c (patch)
tree0f81cad763bd4d54e0f38cc5092d3e274b7ae477 /nixos
parent1bee79f9f7c4a66ac144944f72a02c2e14bd931b (diff)
downloadnixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar.gz
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar.bz2
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar.lz
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar.xz
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.tar.zst
nixlib-df1eee2aa65052a18121ed4971081576b25d6b5c.zip
nixos: show which files are related to "not applying GID/UID change"
I initially thought it was related to /var/lib/nixos/{gid-map,uid-map},
but it seems that to migrate GID/UID you have to edit
/etc/{group,passwd} (and update GID/UID in all files). So mention those
files in the warning messages.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/update-users-groups.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl
index 54352a517a24..75c343523e27 100644
--- a/nixos/modules/config/update-users-groups.pl
+++ b/nixos/modules/config/update-users-groups.pl
@@ -147,7 +147,7 @@ foreach my $g (@{$spec->{groups}}) {
     if (defined $existing) {
         $g->{gid} = $existing->{gid} if !defined $g->{gid};
         if ($g->{gid} != $existing->{gid}) {
-            dry_print("warning: not applying", "warning: would not apply", "GID change of group ‘$name’ ($existing->{gid} -> $g->{gid})");
+            dry_print("warning: not applying", "warning: would not apply", "GID change of group ‘$name’ ($existing->{gid} -> $g->{gid}) in /etc/group");
             $g->{gid} = $existing->{gid};
         }
         $g->{password} = $existing->{password}; # do we want this?
@@ -209,7 +209,7 @@ foreach my $u (@{$spec->{users}}) {
     if (defined $existing) {
         $u->{uid} = $existing->{uid} if !defined $u->{uid};
         if ($u->{uid} != $existing->{uid}) {
-            dry_print("warning: not applying", "warning: would not apply", "UID change of user ‘$name’ ($existing->{uid} -> $u->{uid})");
+            dry_print("warning: not applying", "warning: would not apply", "UID change of user ‘$name’ ($existing->{uid} -> $u->{uid}) in /etc/passwd");
             $u->{uid} = $existing->{uid};
         }
     } else {