The package pkgs.nfs-utils does the following to /etc/request-key.conf:
requestKeyConfFile = pkgs.writeText "request-key.conf" ''
create id_resolver * * ${pkgs.nfs-utils}/bin/nfsidmap -t 600 %k %d
'';
environment.etc = {
"idmapd.conf".source = idmapdConfFile;
"nfs.conf".source = nfsConfFile;
"request-key.conf".source = requestKeyConfFile;
};
In order for my CIFS mounts to work, I also need to add this line:
create dns_resolver * * /run/current-system/sw/bin/key.dns_resolver %k
to /etc/request-key.conf
How can I append this to the nfs-utils package file? I’ve tried many things, like setting it in a seperate etc.environment.“request-key.conf” for instance, but then it complains about conflicting destinations. It then suggests to add lib.mkForce or lib.mkDefault, but this will just cause it to take one of the values instead of merging them together. I also tried making a derivation, but since the original contents from nfs-utils come from a local let...in
statement, there is no way to access it in the override (as far as I know at least).