mfi: relocatable data dir

+10
+10
nixos/modules/services/networking/mfi.nix
··· 10 10 { what = "${pkgs.mfi}/dl"; where = "${stateDir}/dl"; } 11 11 { what = "${pkgs.mfi}/lib"; where = "${stateDir}/lib"; } 12 12 { what = "${pkgs.mongodb248}/bin"; where = "${stateDir}/bin"; } 13 + { what = "${cfg.dataDir}"; where = "${stateDir}/data"; } 13 14 ]; 14 15 systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints; 15 16 ports = [ 6080 6880 6443 6843 ]; ··· 22 23 type = types.bool; 23 24 default = true; 24 25 description = "Whether to open TCP ports ${concatMapStrings (a: "${toString a} ") ports}for the services."; 26 + }; 27 + dataDir = mkOption { 28 + type = types.str; 29 + default = "${stateDir}/data"; 30 + description = '' 31 + Where to store the database and other data. 32 + 33 + This directory will be bind-mounted to ${stateDir}/data as part of the service startup. 34 + ''; 25 35 }; 26 36 }; 27 37 };