Merge pull request #269353 from kylehendricks/snapraid-fix-split-parity2

snapraid: fix split parity files
This commit is contained in:
Emily Trau 2023-12-01 13:40:32 +11:00 committed by GitHub
commit f3814afdc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -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}

View File

@ -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";