You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
afaik it is not possible to write a disko config, so that any disk will be partitioned according to the rules above,
mainly because there is no input information about the disk specs
Possible solution
make it possible to define the content as the function:
Yes, this might be possible to achieve with #789. We can retrieve information about the sustem and pass it into the module evaluation function. We do have to make sure that it's possible to evaluate the config even without that info, though. As I understand, you only care about values related to partition sizing, so I would suggest we change the options start, size and end to allow for functions instead. This would limit the influence the dynamic values can have.
I'm not sure if we use then to set any NixOS options, but if we are not, we could define default empty values for the function inputs so the evaluation as a module as part of the NixOS configuration doesn't break.
In the meantime, you can should be able to get all these values with lsblk -O (I think physical block size is part of this as well) and then change the start of your config to something like
Problem
Here is an example partition layout:
exactly 31 MiB
rest of space
&&multiple of 4GiB
multiple of 16MiB
&&>= 2GiB
&&< 6GiB
multiple of 1MiB
&&>= 8 MiB
&&< 24 MiB
afaik it is not possible to write a disko config, so that any disk will be partitioned according to the rules above,
mainly because there is no input information about the disk specs
Possible solution
make it possible to define the
content
as the function:where disk_specs is the attrset consisting of the following fields:
there might also be the actual physical block size, that disk uses internally, but I'm unsure if it's even possible to get this one
Notes
May be related to #728 and #789
The text was updated successfully, but these errors were encountered: