Merge pull request #247540 from imlonghao/borgmatic/1.8.1

borgmatic: 1.7.15 -> 1.8.1

authored by Arnout Engelen and committed by GitHub aae49a5c d7a0a19d

+45 -18
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 282 283 - 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. 284 285 ## Other Notable Changes {#sec-release-23.11-notable-changes} 286 287 - 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.
··· 282 283 - 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. 284 285 + - `service.borgmatic.settings.location` and `services.borgmatic.configurations.<name>.location` are deprecated, please move your options out of sections to the global scope. 286 + 287 ## Other Notable Changes {#sec-release-23.11-notable-changes} 288 289 - 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 cfg = config.services.borgmatic; 7 settingsFormat = pkgs.formats.yaml { }; 8 9 cfgType = with types; submodule { 10 freeformType = settingsFormat.type; 11 - options.location = { 12 source_directories = mkOption { 13 - type = listOf str; 14 description = mdDoc '' 15 - List of source directories to backup (required). Globs and 16 - tildes are expanded. 17 ''; 18 - example = [ "/home" "/etc" "/var/log/syslog*" ]; 19 }; 20 repositories = mkOption { 21 - type = listOf str; 22 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. 30 ''; 31 example = [ 32 - "ssh://user@backupserver/./sourcehostname.borg" 33 - "ssh://user@backupserver/./{fqdn}" 34 - "/var/local/backups/local.borg" 35 ]; 36 }; 37 }; ··· 61 }; 62 63 config = mkIf cfg.enable { 64 65 environment.systemPackages = [ pkgs.borgmatic ]; 66
··· 6 cfg = config.services.borgmatic; 7 settingsFormat = pkgs.formats.yaml { }; 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 + }; 25 cfgType = with types; submodule { 26 freeformType = settingsFormat.type; 27 + options = { 28 source_directories = mkOption { 29 + type = nullOr (listOf str); 30 + default = null; 31 description = mdDoc '' 32 + List of source directories and files to backup. Globs and tildes are 33 + expanded. Do not backslash spaces in path names. 34 ''; 35 + example = [ "/home" "/etc" "/var/log/syslog*" "/home/user/path with spaces" ]; 36 }; 37 repositories = mkOption { 38 + type = nullOr (listOf repository); 39 + default = null; 40 description = mdDoc '' 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. 49 ''; 50 example = [ 51 + { path="ssh://user@backupserver/./sourcehostname.borg"; label="backupserver"; } 52 + { path="/mnt/backup"; label="local"; } 53 ]; 54 }; 55 }; ··· 79 }; 80 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 + ; 89 90 environment.systemPackages = [ pkgs.borgmatic ]; 91
+2 -2
pkgs/tools/backup/borgmatic/default.nix
··· 13 14 python3Packages.buildPythonApplication rec { 15 pname = "borgmatic"; 16 - version = "1.7.15"; 17 18 src = fetchPypi { 19 inherit pname version; 20 - sha256 = "sha256-esTvcybCPTayA9LCSukNc9ba8eGCTyjB883eZYy91II="; 21 }; 22 23 nativeCheckInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ];
··· 13 14 python3Packages.buildPythonApplication rec { 15 pname = "borgmatic"; 16 + version = "1.8.1"; 17 18 src = fetchPypi { 19 inherit pname version; 20 + sha256 = "sha256-XbihTQJtoiRRfwjMCP+XEPmbt7//zFPx1fIWOvn92Nc="; 21 }; 22 23 nativeCheckInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ];