Commit graph

504 commits

Author SHA1 Message Date
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00
Wolfgang Walther 1c6af9ba0a
treewide: remove unused with
Auto-fixed by nixf-diagnose.

(cherry picked from commit c283f32d29)
2025-10-05 12:38:28 +02:00
Sefa Eyeoglu b70e23a3bb nixos/postgresql-backup: add pgdumpAllOptions
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit 82d2631e1c)
2025-08-30 12:53:14 +00:00
Sandro Jäckel 3edda9e8f3 nixos/postgresql-backup: do not enable assertions when module is disabled
(cherry picked from commit d7fbdf54e1)
2025-08-30 12:27:11 +00:00
Wolfgang Walther 7bc8d63262
[25.05] Backport of #413251 (#435593) 2025-08-26 15:46:28 +00:00
Wolfgang Walther 44d6b48a5f postgresql.tests.postgresql.postgresql-backup-all: fix random dump
The new `\restrict` migitation creates random keys in the dump file by
default, which breaks a before/after test for the backup module. By
making the restrict key reproducible, the test passes again.

(cherry picked from commit 87e1134406)
2025-08-24 09:09:39 +00:00
Brendan Taylor 55ce6a8344 nixos/borgmatic: do not use pg_dumpall when a format is set (#413251)
(cherry picked from commit d0be8ff242)
2025-08-21 18:09:04 +02:00
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Wolfgang Walther a46262ae77
treewide: run treefmt with mdcr/nixfmt 2025-07-24 14:58:15 +02:00
Wolfgang Walther 9d78475ae9
nixos/pgbackrest: prevent storing secrets in store
While we're not (fully) supporting the related features, yet, we already
prevent accidental storage of secrets in the store. This will also avoid
breaking changes in the future, when those features are properly
supported.
2025-05-12 09:14:39 +02:00
Wolfgang Walther 82e519947f
nixos/pgbackrest: add SFTP support 2025-05-12 09:14:38 +02:00
Wolfgang Walther d5ddb6116f
nixos/pgbackrest: init module 2025-05-12 09:14:37 +02:00
Leona Maroni cbc2586506
nixos/doc/rl2505: fix typos (#403348) 2025-05-02 15:25:07 +02:00
Gabe Venberg dad528800a nixos/restic-rest-server: fixed typos. 2025-05-01 21:25:38 +02:00
NotAShelf d4cda46d75
nixos/borgbackup: fix typo in example passphrase 2025-05-01 19:24:08 +03:00
Gabe Venberg b539e4848f nixos/restic-rest-server Fixed htpasswd-path when null.
Made a bad assumption about htpasswd-path's default.
2025-04-18 12:25:33 +02:00
Gabe Venberg b7c8e22ea3 nixos/restic-rest-server: add htpasswd-file setting
in the restic rest-server, you can set the file to use in place of
$datadir/.htpasswd with the --htpasswd-file option. However, this was
unusable from the module with extraConfig, due to systemd hardening.
Adding a dedicated option fixes this.
2025-04-16 20:34:01 +02:00
Sandro 3e0b5e80af
nixos/restic: escape variables in wrapper script (#395005) 2025-04-09 18:07:09 +02:00
Leon Schuermann 71967c47e5 nixos/syncoid: allow interval to be list of strings
The syncoid module generates systemd services with a `startAt` config
based on its `interval` value. However, it is currently not possible
to completely disable this timer, or set multiple `startAt` values.

By accepting the same types that `systemd.services.<name>.startAt`
accepts, we can disable generating a timer unit or set multiple
`startAt` timers.
2025-04-07 16:11:21 -04:00
hotburger f6885105e9
nixos/restic: escape settings in wrapper script 2025-04-07 03:21:40 -07:00
Leonie Marcy Vack 2e0d0d6333 znapzend: use system's zfs package 2025-04-02 15:12:59 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Sandro Jäckel 138abab480
nixos/restic: unlock database before doing pruning
This is safe to do because only stale locks are removed.
See https://github.com/restic/restic/issues/2736 and https://github.com/restic/restic/blob/master/internal/restic/lock.go
By default only locks older than 30 minutes or when the pid is no longer
found on the same machine, are removed. Locks are refreshed every 5
minutes when doing operations.
2025-03-04 22:54:42 +01:00
Sandro Jäckel 7c9c342419
nixos/restic: suggest to cleanup cache 2025-03-04 22:54:34 +01:00
Stefan Mielke c442a189e7 nixos/mysql-backup: fix error when db name contains a dot 2025-02-27 01:06:04 +01:00
Sandro 7379cc70e6
services.restic: use getExe instead of hard-coded path (#376416) 2025-02-19 17:27:20 +01:00
Silvan Mosberger 2dd940e1e9
services.mysqlBackup: make singleTransaction configurable per database (#377134) 2025-02-12 03:54:18 +01:00
6543 0932d53270 services.mysqlBackup: document why we need different dumpBinary paths 2025-02-12 03:42:22 +01:00
Cody Allen bf121f0671
services.restic: use getExe instead of hard-coded path
Instead of assuming the restic executable is at `bin/restic`, use
`lib.getExe` on the restic package. The main motivation for this is
using a security wrapper that has a different name such as
`bin/restic-wrapper`.

NOTE: In rare cases this could be a breaking change. For example if you
are using a wrapper whose executable is at `bin/restic`,
`meta.mainProgram` is not set, _and_ your package name is something
other than `restic`.

See the [discource discussion](https://discourse.nixos.org/t/using-restic-service-with-the-security-wrapper/34547/5) for more details/discussion.
2025-02-07 13:42:57 -05:00
6543 16553f2c83 services.mysqlBackup: add assertion that all databases in singleTransaction must be included in the databases option 2025-02-02 21:09:05 +01:00
6543 00f0c5cf32 services.mysqlBackup: use new path of mariadb-dump if mysql service package is a modern mariadb 2025-02-02 21:09:05 +01:00
6543 d250c32be7 services.mysqlBackup: make singleTransaction configurable per database 2025-02-02 21:09:04 +01:00
Tert0 aca35b7fd6
nixos/restic: add progressFps option 2025-01-30 19:04:44 +01:00
Tert0 54dba7bed8
nixos/restic: nixfmt 2025-01-30 16:43:51 +01:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Alex Martens 74de1cde51 nixos/borgbackup: fix typo in example 2025-01-18 08:06:05 -08:00
6543 917be2fef6 services.mysqlBackup: nixfmt 2025-01-12 20:00:54 +01:00
6543 710b189b14 services.mysqlBackup: apply markdown to description
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2025-01-12 19:51:25 +01:00
6543 085ebf0376 services.mysqlBackup: apply suggested refactoring 2025-01-12 19:50:57 +01:00
6543 8b4703426c services.mysqlBackup: add myselfe as maintainer 2025-01-12 19:45:43 +01:00
6543 ec9d4c4ae6 services.mysqlBackup: add option to change compression tool 2025-01-12 19:45:43 +01:00
6543 459a63f20a services.mysqlBackup: cleanup 2025-01-12 19:45:42 +01:00
Emily e7e0421242
Revert "nixos/rustic: init module" 2025-01-11 22:06:17 +01:00
Léo Gaspard 619f94bf5e nixos/rustic: nixfmt 2025-01-11 15:32:08 +01:00
Léo Gaspard 59664286ac nixos/rustic: fix manual build 2025-01-11 15:26:24 +01:00
Léo Gaspard e0ae370dab nixos/rustic: init module 2025-01-11 15:17:01 +01:00
Léo Gaspard cf4e9229f6 nixos/borgmatic: automatically relax systemd hardening when sudo is required 2025-01-11 14:12:08 +01:00
Léo Gaspard 9cf7310594 nixos/borgmatic: default to the correct user when username is configured 2025-01-11 14:12:08 +01:00
Léo Gaspard 4fa9426a8a nixos/borgmatic: have at least coreutils in the systemd closure by default 2025-01-11 14:12:08 +01:00
Léo Gaspard b873990d4c nixos/borgmatic: automatically add binaries required for database dumping 2025-01-11 14:12:08 +01:00