borgmatic: 1.7.15 -> 1.8.1

+45 -18
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 264 264 265 265 - Setting `nixpkgs.config` options while providing an external `pkgs` instance will now raise an error instead of silently ignoring the options. NixOS modules no longer set `nixpkgs.config` to accomodate this. This specifically affects `services.locate`, `services.xserver.displayManager.lightdm.greeters.tiny` and `programs.firefox` NixOS modules. No manual intervention should be required in most cases, however, configurations relying on those modules affecting packages outside the system environment should switch to explicit overlays. 266 266 267 + - `service.borgmatic.settings.location` and `services.borgmatic.configurations.<name>.location` are deprecated, please move your options out of sections to the global scope. 268 + 267 269 ## Other Notable Changes {#sec-release-23.11-notable-changes} 268 270 269 271 - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.
+41 -16
nixos/modules/services/backup/borgmatic.nix
··· 6 6 cfg = config.services.borgmatic; 7 7 settingsFormat = pkgs.formats.yaml { }; 8 8 9 + repository = with types; submodule { 10 + options = { 11 + path = mkOption { 12 + type = str; 13 + description = mdDoc '' 14 + Path to the repository 15 + ''; 16 + }; 17 + label = mkOption { 18 + type = str; 19 + description = mdDoc '' 20 + Label to the repository 21 + ''; 22 + }; 23 + }; 24 + }; 9 25 cfgType = with types; submodule { 10 26 freeformType = settingsFormat.type; 11 - options.location = { 27 + options = { 12 28 source_directories = mkOption { 13 - type = listOf str; 29 + type = nullOr (listOf str); 30 + default = null; 14 31 description = mdDoc '' 15 - List of source directories to backup (required). Globs and 16 - tildes are expanded. 32 + List of source directories and files to backup. Globs and tildes are 33 + expanded. Do not backslash spaces in path names. 17 34 ''; 18 - example = [ "/home" "/etc" "/var/log/syslog*" ]; 35 + example = [ "/home" "/etc" "/var/log/syslog*" "/home/user/path with spaces" ]; 19 36 }; 20 37 repositories = mkOption { 21 - type = listOf str; 38 + type = nullOr (listOf repository); 39 + default = null; 22 40 description = mdDoc '' 23 - Paths to local or remote repositories (required). Tildes are 24 - expanded. Multiple repositories are backed up to in 25 - sequence. Borg placeholders can be used. See the output of 26 - "borg help placeholders" for details. See ssh_command for 27 - SSH options like identity file or port. If systemd service 28 - is used, then add local repository paths in the systemd 29 - service file to the ReadWritePaths list. 41 + A required list of local or remote repositories with paths and 42 + optional labels (which can be used with the --repository flag to 43 + select a repository). Tildes are expanded. Multiple repositories are 44 + backed up to in sequence. Borg placeholders can be used. See the 45 + output of "borg help placeholders" for details. See ssh_command for 46 + SSH options like identity file or port. If systemd service is used, 47 + then add local repository paths in the systemd service file to the 48 + ReadWritePaths list. 30 49 ''; 31 50 example = [ 32 - "ssh://user@backupserver/./sourcehostname.borg" 33 - "ssh://user@backupserver/./{fqdn}" 34 - "/var/local/backups/local.borg" 51 + { path="ssh://user@backupserver/./sourcehostname.borg"; label="backupserver"; } 52 + { path="/mnt/backup"; label="local"; } 35 53 ]; 36 54 }; 37 55 }; ··· 61 79 }; 62 80 63 81 config = mkIf cfg.enable { 82 + 83 + warnings = [] 84 + ++ optional (cfg.settings != null && cfg.settings.location != null) 85 + "`services.borgmatic.settings.location` is deprecated, please move your options out of sections to the global scope" 86 + ++ optional (catAttrs "location" (attrValues cfg.configurations) != []) 87 + "`services.borgmatic.configurations.<name>.location` is deprecated, please move your options out of sections to the global scope" 88 + ; 64 89 65 90 environment.systemPackages = [ pkgs.borgmatic ]; 66 91
+2 -2
pkgs/tools/backup/borgmatic/default.nix
··· 13 13 14 14 python3Packages.buildPythonApplication rec { 15 15 pname = "borgmatic"; 16 - version = "1.7.15"; 16 + version = "1.8.1"; 17 17 18 18 src = fetchPypi { 19 19 inherit pname version; 20 - sha256 = "sha256-esTvcybCPTayA9LCSukNc9ba8eGCTyjB883eZYy91II="; 20 + sha256 = "sha256-XbihTQJtoiRRfwjMCP+XEPmbt7//zFPx1fIWOvn92Nc="; 21 21 }; 22 22 23 23 nativeCheckInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ];