Nixos repeatable options not supported
- Ngôn ngữ chính
- Python
- Star
- 46.6k
- Fork
- 1.9k
- Merge trung bình
- 10 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
In the [nix file](https://github.com/9001/copyparty/blob/hovudstraum/contrib/nixos/modules/copyparty.nix), all array values are transformed into comma separated, which works for the example with `p`, but not for repeatable options, as nix doesn't support repeated keys in objects.
This could be easily set via [`listsAsDuplicateKeys`](https://noogle.dev/f/lib/generators/toKeyValue), except that would in turn break comma separated values.
Either copyparty itself should choose one of those (or support both for some things? For example always support repeating the command and just merge it into comma separated values?) or the nix file should have a whitelist of options that are repeatable. This for example impacts `ipu` which now crashes with error that it must be CIDR=name and not comma separated CIDR1=name1,CIDR2=name2 etc.
Or just allow setting custom command line options for copyparty in the service definition.
Edit for anyone finding this:
`globalExtraConfig` was added that adds custom string to [global]:
```
services.copyparty.globalExtraConfig = ''
mime: qoi=image/x-qoi
mime: adf=application/x-amiga-disk-format
ipu: 172.16.24.0/24=dave
ipu: 172.16.27.0/24=ben
'';
```
Thanks a lot!
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.