From 86357de0c8d971f968b776abfc9f556b759f0ed2 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Fri, 22 Apr 2016 22:43:45 -0700 Subject: mfi: relocatable data dir --- nixos/modules/services/networking/mfi.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/mfi.nix b/nixos/modules/services/networking/mfi.nix index 5afb83ed022f..775564a2c446 100644 --- a/nixos/modules/services/networking/mfi.nix +++ b/nixos/modules/services/networking/mfi.nix @@ -10,6 +10,7 @@ let { what = "${pkgs.mfi}/dl"; where = "${stateDir}/dl"; } { what = "${pkgs.mfi}/lib"; where = "${stateDir}/lib"; } { what = "${pkgs.mongodb248}/bin"; where = "${stateDir}/bin"; } + { what = "${cfg.dataDir}"; where = "${stateDir}/data"; } ]; systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints; ports = [ 6080 6880 6443 6843 ]; @@ -23,6 +24,15 @@ in default = true; description = "Whether to open TCP ports ${concatMapStrings (a: "${toString a} ") ports}for the services."; }; + dataDir = mkOption { + type = types.str; + default = "${stateDir}/data"; + description = '' + Where to store the database and other data. + + This directory will be bind-mounted to ${stateDir}/data as part of the service startup. + ''; + }; }; }; -- cgit 1.4.1