programs.borgmatic.enable
Whether to enable Borgmatic.
Type: boolean
Default:
false
Example:
true
Declared by:
programs.borgmatic.package
The borgmatic package to use.
Type: null or package
Default:
pkgs.borgmatic
Declared by:
programs.borgmatic.backups
Borgmatic allows for several named backup configurations, each with its own source directories and repositories.
Type: attribute set of (submodule)
Example:
{
personal = {
location = {
sourceDirectories = [ "/home/me/personal" ];
repositories = [ "ssh://myuser@myserver.com/./personal-repo" ];
};
};
work = {
location = {
sourceDirectories = [ "/home/me/work" ];
repositories = [ "ssh://myuser@myserver.com/./work-repo" ];
};
};
};
Declared by:
programs.borgmatic.backups.<name>.consistency.checks
Consistency checks to run
Type: list of (submodule)
Default:
[ ]
Example:
[
{
name = "repository";
frequency = "2 weeks";
}
{
name = "archives";
frequency = "4 weeks";
}
{
name = "data";
frequency = "6 weeks";
}
{
name = "extract";
frequency = "6 weeks";
}
];
Declared by:
programs.borgmatic.backups.<name>.consistency.checks.*.frequency
Frequency of this type of check
Type: null or string matching the pattern ([[:digit:]]+ .*)|always
Default:
null
Example:
"2 weeks"
Declared by:
programs.borgmatic.backups.<name>.consistency.checks.*.name
Name of consistency check to run.
Type: one of “repository”, “archives”, “data”, “extract”
Example:
"repository"
Declared by:
programs.borgmatic.backups.<name>.consistency.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by:
programs.borgmatic.backups.<name>.hooks.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by:
programs.borgmatic.backups.<name>.location.excludeHomeManagerSymlinks
Whether to exclude Home Manager generated symbolic links from the backups. This facilitates restoring the whole home directory when the Nix store doesn’t contain the latest Home Manager generation.
Type: boolean
Default:
false
Example:
true
Declared by:
programs.borgmatic.backups.<name>.location.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by:
programs.borgmatic.backups.<name>.location.patterns
Patterns to include/exclude.
See the output of borg help patterns for the syntax. Pattern paths
are relative to / even when a different recursion root is set.
Type: null or (list of string)
Default:
null
Example:
[
"R /home/user"
"- home/user/.cache"
"- home/user/Downloads"
"+ home/user/Videos/Important Video"
"- home/user/Videos"
]
Declared by:
programs.borgmatic.backups.<name>.location.repositories
List of local or remote repositories with paths and optional labels.
Type: list of (string or (submodule))
Default:
[ ]
Example:
[
{
"path" = "ssh://myuser@myrepo.myserver.com/./repo";
"label" = "server";
}
{
"path" = "/var/lib/backups/local.borg";
"label" = "local";
}
]
Declared by:
programs.borgmatic.backups.<name>.location.repositories.*.label
Short text describing the repository. Can be used with the
--repository flag to select a repository.
Type: null or string
Default:
null
Example:
"remote"
programs.borgmatic.backups.<name>.location.repositories.*.path
Path of the repository.
Type: string
Example:
"ssh://myuser@myrepo.myserver.com/./repo"
programs.borgmatic.backups.<name>.location.sourceDirectories
Directories to backup.
Type: null or (list of string)
Default:
null
Example:
[config.home.homeDirectory]
Declared by:
programs.borgmatic.backups.<name>.output.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by:
programs.borgmatic.backups.<name>.retention.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by:
programs.borgmatic.backups.<name>.retention.keepDaily
Number of daily archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepHourly
Number of hourly archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepMinutely
Number of minutely archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepMonthly
Number of monthly archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepSecondly
Number of secondly archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepWeekly
Number of weekly archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.retention.keepWithin
Keep all archives within this time interval.
Type: null or string matching the pattern [[:digit:]]+[Hdwmy]
Default:
null
Example:
"2d"
Declared by:
programs.borgmatic.backups.<name>.retention.keepYearly
Number of yearly archives to keep. Use -1 for no limit.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
programs.borgmatic.backups.<name>.storage.encryptionPasscommand
Command writing the passphrase to standard output.
Type: null or string
Default:
null
Example:
"${pkgs.password-store}/bin/pass borg-repo"
Declared by:
programs.borgmatic.backups.<name>.storage.extraConfig
Extra settings.
Type: YAML 1.1 value
Default:
{ }
Declared by: