{ config, pkgs, lib, ... }: let inherit (lib) mkIf mkEnableOption optional; cfg = config.modules.fs; in { options.modules.fs = { nfsEnable = mkEnableOption "nfs"; }; config = { services.rpcbind.enable = mkIf cfg.nfsEnable true; environment.systemPackages = optional cfg.nfsEnable pkgs.nfs-utils; }; }