because it breaks evaluation on darwin with at least nix 2.18.
Evaluating `lib.splitString "" "foo"` throws the following:
`error: invalid regular expression ''`.
We could avoid that by using lib.stringToCharacters, but as
we are mapping over it anyway, lib.stringAsChars seems to be
an even better fit.
I tested the examples in hexEscapeUdevSymlinks docstring manually
in a nix repl.
this is useful in cases where the target machine has
a pre-configured RAID setup, as otherwise disko would
wipe the partition tables and create new ones but would
not be able to inform the kernel about it, as the old
raid was still in use.
Not sure about the best implementation here yet.
I'd like to use disk encryption with ZFS and existing disko facilities
work fine to set it up, but we obviously can't use keylocation=prompt
during disko formatting. So unlocking fails on boot if the file referred
to by keylocation isn't included in the initrd.
Ideally I could use keylocation=file://tmp/disk.key during partitioning,
but set keylocation=prompt right after that.
example usage:
```
rpool = {
type = "zpool";
mode = "";
options = {
ashift = "12";
autotrim = "on";
};
optionsAfterCreate = {
keylocation = "prompt";
};
rootFsOptions = {
encryption = "on";
keylocation = "file:///tmp/disk.key";
keyformat = "passphrase";
compression = "zstd";
acltype = "posixacl";
mountpoint = "none";
canmount = "off";
xattr = "sa";
dnodesize = "auto";
normalization = "formD";
relatime = "on";
};
```