Relocation of config and data directory - robert7/nixnote2 GitHub Wiki
TL;DR
To run NixNote from user specified directory: nixnote2 --configDir=/any/directory/you-want
Legacy
Config and data directory in v2.0 was fixed to $HOME/.nixnote.
Data locations overview
- if
$HOME/.nixnotedirectory does exist, this will be used to make migration from v2.0 easier (see bellow) - Otherwise system default paths of your linux distribution will be used (usually:
$HOME/.config/nixnote2for config and$HOME/.local/share/nixnote2for data). - Overrides by
--configDiroption (and optionaly--userDataDir) for more info seenixnote2 --help
Check menu action Help/Data and log location info for currently active locations.
images/application-files-info-01.png
Migration
To make migration easier and e.g. testing of v.2.0 together with v2.1 on the same data, if the v.2.1 detects that $HOME/.nixnote exists, it will be used. This will make v2.1 to pickup the "legacy" data and work with it correctly. The used data and config format is compatible in both ways. So you can start v2.1 on data from v2.0 and then switch back to v2.0. Just in this case never run both versions at the same time (there is a locking it place, this shouldn't make this possible, but but better don't even try :) )
Manual override
You can manually override this by using command line --configDir.
Example: nixnote2 --configDir=$HOME/.nixnote2 would instruct Nixnote to store both config and data in $HOME/.nixnote2. So you can e.g. start NixNote from a thumbdrive.
Sandboxing
If you want e.g. sandbox the new version to be sure it completely separated from existing v2.0 - you could do: cp -rf $HOME/.nixnote $HOME/.nixnote2 and then start nixnote2 --configDir=$HOME/.nixnote2.
Encrypted data directory
Another variant: let say you want encrypted data storage.
Mount encrypted volume e.g. with truecrypt to /media/truecrypt1, then nixnote2 --configDir=/media/truecrypt1/nixnote2.
Note: there is additional option --userDataDir so you can override "config dir" with one value and "data dir" with another, but in most cases this would be overkill. If --configDir is used and --userDataDir is not used then userDataDir will default to configDir.