diff options
author | Emily Trau <13267947+emilytrau@users.noreply.github.com> | 2023-12-01 13:40:32 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 13:40:32 +1100 |
commit | f3814afdc6e6475c5bed4080821b1e47867eb982 (patch) | |
tree | 5c09b62a2ba2357f3133e3692a9abcc59f507891 | |
parent | a9b207033988bcac06b5c5d780668b3a96011b72 (diff) | |
parent | 463424129d0c05e5332882613a8363cb3817d0d5 (diff) | |
download | nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar.gz nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar.bz2 nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar.lz nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar.xz nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.tar.zst nixlib-f3814afdc6e6475c5bed4080821b1e47867eb982.zip |
Merge pull request #269353 from kylehendricks/snapraid-fix-split-parity2
snapraid: fix split parity files
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2311.section.md | 3 | ||||
-rw-r--r-- | nixos/modules/tasks/snapraid.nix | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index fb663b7894d8..760c58d5050e 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -1308,6 +1308,9 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2 qemu-vm module from overriding `fileSystems` by setting `virtualisation.fileSystems = lib.mkForce { };`. +- When using [split parity files](https://www.snapraid.it/manual#7.1) in `snapraid`, + the snapraid-sync systemd service will no longer fail to run. + ## Nixpkgs Library {#sec-release-23.11-nixpkgs-lib} ### Breaking Changes {#sec-release-23.11-lib-breaking} diff --git a/nixos/modules/tasks/snapraid.nix b/nixos/modules/tasks/snapraid.nix index 243d25f88423..9570c6b76123 100644 --- a/nixos/modules/tasks/snapraid.nix +++ b/nixos/modules/tasks/snapraid.nix @@ -217,9 +217,13 @@ in # to remove them if they are stale let contentDirs = map dirOf contentFiles; + # Multiple "split" parity files can be specified in a single + # "parityFile", separated by a comma. + # https://www.snapraid.it/manual#7.1 + splitParityFiles = map (s: splitString "," s) parityFiles; in unique ( - attrValues dataDisks ++ parityFiles ++ contentDirs + attrValues dataDisks ++ splitParityFiles ++ contentDirs ); } // optionalAttrs touchBeforeSync { ExecStartPre = "${pkgs.snapraid}/bin/snapraid touch"; |