···282282283283- 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.
284284285285+- `service.borgmatic.settings.location` and `services.borgmatic.configurations.<name>.location` are deprecated, please move your options out of sections to the global scope.
286286+285287## Other Notable Changes {#sec-release-23.11-notable-changes}
286288287289- 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
···66 cfg = config.services.borgmatic;
77 settingsFormat = pkgs.formats.yaml { };
8899+ repository = with types; submodule {
1010+ options = {
1111+ path = mkOption {
1212+ type = str;
1313+ description = mdDoc ''
1414+ Path to the repository
1515+ '';
1616+ };
1717+ label = mkOption {
1818+ type = str;
1919+ description = mdDoc ''
2020+ Label to the repository
2121+ '';
2222+ };
2323+ };
2424+ };
925 cfgType = with types; submodule {
1026 freeformType = settingsFormat.type;
1111- options.location = {
2727+ options = {
1228 source_directories = mkOption {
1313- type = listOf str;
2929+ type = nullOr (listOf str);
3030+ default = null;
1431 description = mdDoc ''
1515- List of source directories to backup (required). Globs and
1616- tildes are expanded.
3232+ List of source directories and files to backup. Globs and tildes are
3333+ expanded. Do not backslash spaces in path names.
1734 '';
1818- example = [ "/home" "/etc" "/var/log/syslog*" ];
3535+ example = [ "/home" "/etc" "/var/log/syslog*" "/home/user/path with spaces" ];
1936 };
2037 repositories = mkOption {
2121- type = listOf str;
3838+ type = nullOr (listOf repository);
3939+ default = null;
2240 description = mdDoc ''
2323- Paths to local or remote repositories (required). Tildes are
2424- expanded. Multiple repositories are backed up to in
2525- sequence. Borg placeholders can be used. See the output of
2626- "borg help placeholders" for details. See ssh_command for
2727- SSH options like identity file or port. If systemd service
2828- is used, then add local repository paths in the systemd
2929- service file to the ReadWritePaths list.
4141+ A required list of local or remote repositories with paths and
4242+ optional labels (which can be used with the --repository flag to
4343+ select a repository). Tildes are expanded. Multiple repositories are
4444+ backed up to in sequence. Borg placeholders can be used. See the
4545+ output of "borg help placeholders" for details. See ssh_command for
4646+ SSH options like identity file or port. If systemd service is used,
4747+ then add local repository paths in the systemd service file to the
4848+ ReadWritePaths list.
3049 '';
3150 example = [
3232- "ssh://user@backupserver/./sourcehostname.borg"
3333- "ssh://user@backupserver/./{fqdn}"
3434- "/var/local/backups/local.borg"
5151+ { path="ssh://user@backupserver/./sourcehostname.borg"; label="backupserver"; }
5252+ { path="/mnt/backup"; label="local"; }
3553 ];
3654 };
3755 };
···6179 };
62806381 config = mkIf cfg.enable {
8282+8383+ warnings = []
8484+ ++ optional (cfg.settings != null && cfg.settings.location != null)
8585+ "`services.borgmatic.settings.location` is deprecated, please move your options out of sections to the global scope"
8686+ ++ optional (catAttrs "location" (attrValues cfg.configurations) != [])
8787+ "`services.borgmatic.configurations.<name>.location` is deprecated, please move your options out of sections to the global scope"
8888+ ;
64896590 environment.systemPackages = [ pkgs.borgmatic ];
6691