-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error when filesystem format has an unsupported values #829
Comments
My preference would be the latter, we could even allow users to specify |
the problem is with an inclusive list, is that people need to patch disko to add support for new filesystems. currently you can run any mkfs.* command and maybe the package is just missing but that can be passed by ammending PATH externally. I used that a couple of times for exfat or ntfs-3g. |
I think it would be fine if users just sent through PRs just to update the list of filesystems supported (without adding full support) whenever they encountered new filesystems that have a A few more that haven't been mentioned yet:
You can get a list of all of the Hydra built (
|
Ah yes that's a better option than the user simply seeing "value of
Yeah I agree. And with a bit of effort I think we can basically create a list of all filesystems that we know we can support, and leave out those that we can't. Of course there will be cases of someone wanting to use their custom-made filesystem together with a custom package, but maybe would could solve that differently then? We could extend the type to allow either strings for these simple cases, or an attrset like {
name = "dwarffs";
package = pkgs.dwarffs;
binary = "dfs-create";
} This would allow maximum flexibility and discoverability at the same time. |
Ah, and we should probably make this change a two-step process by first issuing warnings when a user specifies a |
Good example of why an inclusive list will be a breaking change: #840 |
Right now, the filesystem type's
format
argument supports arbitrary strings.This can cause confusion when you expect to be able to insert
zfs
, for example, and expect it to just work, see #820.One solution, suggested in #820 (comment), would be to check for known bad values like
zfs
, and return an error. This could be implemented with NixOS module assertions as we're relying on evalModules already.Another option would be to change the type to only allow filesystems that can be built with an
mkfs.<type>
command. From what I can tell, this is the entire list of currently supported file systems:Both options have their merits. Any opinions?
The text was updated successfully, but these errors were encountered: