nfs-utils: set /etc/krb5.keytab as default path for rpc-gssd

Currently the `rpc-gssd.service` has a `ConditionPathExists` clause that can
never be met, because it's looking for stateful data inside `/nix/store`.

`auth-rpcgss-module.service` also only starts if this file exists.

Fixes NixOS/nixpkgs#29509.

Changed files
+7 -1
nixos
modules
tasks
filesystems
pkgs
os-specific
linux
nfs-utils
+6
nixos/modules/tasks/filesystems/nfs.nix
···
enable = mkDefault false;
};
+
systemd.services.auth-rpcgss-module =
+
{
+
unitConfig.ConditionPathExists = [ "" "/etc/krb5.keytab" ];
+
};
+
systemd.services.rpc-gssd =
{ restartTriggers = [ nfsConfFile ];
+
unitConfig.ConditionPathExists = [ "" "/etc/krb5.keytab" ];
};
systemd.services.rpc-statd =
+1 -1
pkgs/os-specific/linux/nfs-utils/default.nix
···
sed -i "s,^PATH=.*,PATH=$out/bin:${statdPath}," utils/statd/start-statd
configureFlags="--with-start-statd=$out/bin/start-statd $configureFlags"
-
+
substituteInPlace systemd/nfs-utils.service \
--replace "/bin/true" "${coreutils}/bin/true"