···203 description = ''
204 This option effectively allows adding setuid/setgid bits, capabilities,
205 changing file ownership and permissions of a program without directly
206- modifying it. This works by creating a wrapper program under the
207- {option}`security.wrapperDir` directory, which is then added to
208- the shell `PATH`.
209 '';
210 };
211
···203 description = ''
204 This option effectively allows adding setuid/setgid bits, capabilities,
205 changing file ownership and permissions of a program without directly
206+ modifying it. This works by creating a wrapper program in a directory
207+ (not configurable), which is then added to the shell `PATH`.
0208 '';
209 };
210
+32-3
nixos/modules/services/backup/mysql-backup.nix
···8 cfg = config.services.mysqlBackup;
9 defaultUser = "mysqlbackup";
1000000000000011 compressionAlgs = {
12 gzip = rec {
13 pkg = pkgs.gzip;
···39 selectedAlg = compressionAlgs.${cfg.compressionAlg};
40 compressionCmd = selectedAlg.cmd compressionLevelFlag;
41000000042 backupScript = ''
43 set -o pipefail
44 failed=""
···5152 backupDatabaseScript = db: ''
53 dest="${cfg.location}/${db}${selectedAlg.ext}"
54- if ${pkgs.mariadb}/bin/mysqldump ${lib.optionalString cfg.singleTransaction "--single-transaction"} ${db} | ${compressionCmd} > $dest.tmp; then
55 mv $dest.tmp $dest
56 echo "Backed up to $dest"
57 else
···126127 singleTransaction = lib.mkOption {
128 default = false;
129- type = lib.types.bool;
000130 description = ''
131- Whether to create database dump in a single transaction
0132 '';
133 };
134···152 cfg.compressionLevel == null
153 || selectedAlg.minLevel <= cfg.compressionLevel && cfg.compressionLevel <= selectedAlg.maxLevel;
154 message = "${cfg.compressionAlg} compression level must be between ${toString selectedAlg.minLevel} and ${toString selectedAlg.maxLevel}";
000000155 }
156 ];
157
···8 cfg = config.services.mysqlBackup;
9 defaultUser = "mysqlbackup";
1011+ # Newer mariadb versions warn of the usage of 'mysqldump' and recommend 'mariadb-dump' (https://mariadb.com/kb/en/mysqldump/)
12+ dumpBinary =
13+ if
14+ (
15+ lib.getName config.services.mysql.package == lib.getName pkgs.mariadb
16+ && lib.versionAtLeast config.services.mysql.package.version "11.0.0"
17+ )
18+ then
19+ "${config.services.mysql.package}/bin/mariadb-dump"
20+ else
21+ "${config.services.mysql.package}/bin/mysqldump";
22+23 compressionAlgs = {
24 gzip = rec {
25 pkg = pkgs.gzip;
···51 selectedAlg = compressionAlgs.${cfg.compressionAlg};
52 compressionCmd = selectedAlg.cmd compressionLevelFlag;
5354+ shouldUseSingleTransaction =
55+ db:
56+ if lib.isBool cfg.singleTransaction then
57+ cfg.singleTransaction
58+ else
59+ lib.elem db cfg.singleTransaction;
60+61 backupScript = ''
62 set -o pipefail
63 failed=""
···7071 backupDatabaseScript = db: ''
72 dest="${cfg.location}/${db}${selectedAlg.ext}"
73+ if ${dumpBinary} ${lib.optionalString (shouldUseSingleTransaction db) "--single-transaction"} ${db} | ${compressionCmd} > $dest.tmp; then
74 mv $dest.tmp $dest
75 echo "Backed up to $dest"
76 else
···145146 singleTransaction = lib.mkOption {
147 default = false;
148+ type = lib.types.oneOf [
149+ lib.types.bool
150+ (lib.types.listOf lib.types.str)
151+ ];
152 description = ''
153+ Whether to create database dump in a single transaction.
154+ Can be either a boolean for all databases or a list of database names.
155 '';
156 };
157···175 cfg.compressionLevel == null
176 || selectedAlg.minLevel <= cfg.compressionLevel && cfg.compressionLevel <= selectedAlg.maxLevel;
177 message = "${cfg.compressionAlg} compression level must be between ${toString selectedAlg.minLevel} and ${toString selectedAlg.maxLevel}";
178+ }
179+ {
180+ assertion =
181+ !(lib.isList cfg.singleTransaction)
182+ || lib.all (db: lib.elem db cfg.databases) cfg.singleTransaction;
183+ message = "All databases in singleTransaction must be included in the databases option";
184 }
185 ];
186
···25 nativeBuildInputs = [
26 which
27 ];
0002829 doCheck = true;
03031 meta = {
32 description = "Tool for buffering data streams with a large set of unique features";
···25 nativeBuildInputs = [
26 which
27 ];
28+ nativeCheckInputs = [
29+ openssl
30+ ];
3132 doCheck = true;
33+ strictDeps = true;
3435 meta = {
36 description = "Tool for buffering data streams with a large set of unique features";
···1559 xplayer = throw "xplayer has been removed as the upstream project was archived"; # Added 2024-12-27
1560 xprite-editor = throw "'xprite-editor' has been removed due to lack of maintenance upstream. Consider using 'pablodraw' or 'aseprite' instead"; # Added 2024-09-14
1561 xsv = throw "'xsv' has been removed due to lack of upstream maintenance. Please see 'xan' for a maintained alternative";
01562 xulrunner = firefox-unwrapped; # Added 2023-11-03
1563 xvfb_run = throw "'xvfb_run' has been renamed to/replaced by 'xvfb-run'"; # Converted to throw 2024-10-17
1564 xwaylandvideobridge = libsForQt5.xwaylandvideobridge; # Added 2024-09-27
···1559 xplayer = throw "xplayer has been removed as the upstream project was archived"; # Added 2024-12-27
1560 xprite-editor = throw "'xprite-editor' has been removed due to lack of maintenance upstream. Consider using 'pablodraw' or 'aseprite' instead"; # Added 2024-09-14
1561 xsv = throw "'xsv' has been removed due to lack of upstream maintenance. Please see 'xan' for a maintained alternative";
1562+ xtrlock-pam = throw "xtrlock-pam has been removed because it is unmaintained for 10 years and doesn't support Python 3.10 or newer"; # Added 2025-01-25
1563 xulrunner = firefox-unwrapped; # Added 2023-11-03
1564 xvfb_run = throw "'xvfb_run' has been renamed to/replaced by 'xvfb-run'"; # Converted to throw 2024-10-17
1565 xwaylandvideobridge = libsForQt5.xwaylandvideobridge; # Added 2024-09-27
···508 pynose = throw "pynose was removed, because it violates the license of nose, by redistributing modified LGPL code under MIT.";
509 python-ethtool = ethtool; # added 2024-07-23
510 python-myq = throw "python-myq has been removed, as the service provider has decided to block its API requests"; # added 2023-12-07
0511 pyqt4 = throw "pyqt4 has been removed, because it depended on the long EOL qt4"; # added 2022-06-09
512 pyqt5_sip = pyqt5-sip; # added 2024-01-07
513 pyqt5_with_qtmultimedia = pyqt5-multimedia; # added 2024-01-07
···508 pynose = throw "pynose was removed, because it violates the license of nose, by redistributing modified LGPL code under MIT.";
509 python-ethtool = ethtool; # added 2024-07-23
510 python-myq = throw "python-myq has been removed, as the service provider has decided to block its API requests"; # added 2023-12-07
511+ pytrends = throw "pytrends has been removed, as it no longer works and is abandoned upstream"; # added 2025-02-02
512 pyqt4 = throw "pyqt4 has been removed, because it depended on the long EOL qt4"; # added 2022-06-09
513 pyqt5_sip = pyqt5-sip; # added 2024-01-07
514 pyqt5_with_qtmultimedia = pyqt5-multimedia; # added 2024-01-07