Skip to content

Opting Out of NFS Home Sharing

The nfs service shares user XDG directories from a zone server: on each client, ~/Documents, ~/Images… are symbolic links pointing to /mnt/nfs/homes/<login>/, with the original content parked in <directory>.bak.

This page describes the rollback: disabling the sharing, then restoring ordinary local directories to each home.

  1. In etc/config.yaml, remove "nfs-client" from the features field of each client host, and the nfs: key from the server’s services.

  2. Regenerate and apply, clients first, server last:

    Fenêtre de terminal
    just generate
    just apply <client>
    just apply <server>
  3. Verify that nothing is mounted on the clients:

    Fenêtre de terminal
    findmnt /mnt/nfs/homes # should return nothing
Fenêtre de terminal
just nfs-cleanup <host> # dry run, writes nothing
just nfs-cleanup <host> apply # execution

on accepts a comma-separated list, or all for every node. The check mode displays exactly the actions that apply would perform.

For each /home account and only for top-level XDG directories, the script:

  • removes the links to the share;
  • on the original server, first moves the data from /srv/nfs/homes/<login>/ into the home (reflink copy, then source removal once sizes are compared);
  • restores <directory>.bak entries whose name is available;
  • removes only empty FR/EN duplicates, and reports those that contain data on both sides;
  • regenerates missing directories with xdg-user-dirs-update, in the zone’s language;
  • removes GTK bookmarks pointing to the share.

The script is idempotent: a second run finds nothing left to do.

Track sharing no longer depends on the nfs service: declare stk: in the services of the host that serves, and set the following on each player

darkone.graphic.supertuxkart = {
enable = true;
enableNfsClient = true;
};

The serving host has nothing to mount — its tracks are already local.