@ -189,9 +189,7 @@ in {
localDiscovery = mkOption {
type = types . bool ;
description = '' W h e t h e r t o e n a b l e l o c a l d i s c o v e r y f o r t h e i p f s d a e m o n .
This will prevent ipfs to scan ports on your local network . Some hosting services will ban you if you do .
This option only has an effect before you initialized ipfs your machine .
This will allow ipfs to scan ports on your local network . Some hosting services will ban you if you do this .
'' ;
default = true ;
} ;
@ -244,6 +242,11 @@ in {
if [ [ ! - f $ { cfg . dataDir } /config ] ] ; then
ipfs init $ { optionalString cfg . emptyRepo " - e " } \
$ { optionalString ( ! cfg . localDiscovery ) " - - p r o f i l e = s e r v e r " }
else
$ { if cfg . localDiscovery
then " i p f s c o n f i g p r o f i l e a p p l y l o c a l - d i s c o v e r y "
else " i p f s c o n f i g p r o f i l e a p p l y s e r v e r "
}
fi
'' ;