Skip to content

nixos/nfs: nproc setting not being applied #451921

@gtebbutt

Description

@gtebbutt

Nixpkgs version

  • Stable (25.05)

Describe the bug

The setting services.nfs.server.nproc doesn't appear to be applied if set - it's mapped to a setting nfsd.threads in https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/nfs.nix#L20, but the value is not written to /etc/nfs.conf on rebuild, and /proc/fs/nfsd/threads still shows the default value of 8 even after reboot.

Other settings in that block apply correctly (e.g. services.nfs.server.hostName, which correctly writes a host setting under [nfsd] in /etc/nfs.conf), and it looks like server.nproc is the only one that is not prefixed with // in the module code.

Writing the setting directly with services.nfs.settings.nfsd.threads works as expected, so can be used instead of services.nfs.server.nproc.

Steps to reproduce

  • Set at least one value in services.nfs.settings, e.g. services.nfs.settings.nfsd.vers3 = false;
  • Set a non-default value for services.nfs.server.nproc, e.g. services.nfs.server.nproc = 32;
  • Rebuild, and check whether the values in /etc/nfs.conf and /proc/fs/nfsd/threads have changed

Expected behaviour

Changing the value sets threads in /etc/nfs.conf

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.50, NixOS, 25.05 (Warbler), 25.05.20251004.3bcc93c
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.28.5
  • nixpkgs: /nix/store/px86fbsnq65agwvrxnylrxnxp6bpcl76-source

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions