environment.persistence
Persistent storage locations and the files and directories to link to them. Each attribute name should be the full path to a persistent storage location.
For detailed usage, check the documentation.
type
attribute set of submodule
default
{
environment.persistence = {};
}
environment.persistence.<name>.directories
Directories to bind mount to persistent storage.
type
list of string
example
{
environment.persistence.<name>.directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
}
default
{
environment.persistence.<name>.directories = [];
}
environment.persistence.<name>.files
Files in /etc that should be stored in persistent storage.
type
list of string
example
{
environment.persistence.<name>.files = [
"/etc/machine-id"
"/etc/nix/id_rsa"
];
}
default
{
environment.persistence.<name>.files = [];
}