about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2023-09-13 11:43:19 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2023-09-13 11:44:19 +0200
commit205b56cffc54f7e9626595429bd407902fc7b04a (patch)
treebf82ce9eae5c6839d01ce558104f42b52a6f92ee /nixos/modules
parent51078b896cc40847d7621112422e20bdc6ec4687 (diff)
nixos/user-groups: fixup of 5666a378
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/update-users-groups.pl8
-rw-r--r--nixos/modules/config/users-groups.nix2
2 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl
index 3785ba8c5fb80..7c6851473f42f 100644
--- a/nixos/modules/config/update-users-groups.pl
+++ b/nixos/modules/config/update-users-groups.pl
@@ -239,12 +239,12 @@ foreach my $u (@{$spec->{users}}) {
         chmod oct($u->{homeMode}), $u->{home};
     }
 
-    if (defined $u->{passwordFile}) {
-        if (-e $u->{passwordFile}) {
-            $u->{hashedPassword} = read_file($u->{passwordFile});
+    if (defined $u->{hashedPasswordFile}) {
+        if (-e $u->{hashedPasswordFile}) {
+            $u->{hashedPassword} = read_file($u->{hashedPasswordFile});
             chomp $u->{hashedPassword};
         } else {
-            warn "warning: password file ‘$u->{passwordFile}’ does not exist\n";
+            warn "warning: password file ‘$u->{hashedPasswordFile}’ does not exist\n";
         }
     } elsif (defined $u->{password}) {
         $u->{hashedPassword} = hashPassword($u->{password});
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index 4893d28924ebd..5158974c27b36 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/nixos/modules/config/users-groups.nix
@@ -264,7 +264,7 @@ let
       };
 
       passwordFile = mkOption {
-        type = with types; nullOr (passwdEntry str);
+        type = with types; nullOr str;
         default = null;
         visible = false;
         description = lib.mdDoc "Deprecated alias of hashedPasswordFile";