-
Notifications
You must be signed in to change notification settings - Fork 83
Document the Jsonnet example #655
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,18 @@ | ||
| // This is a Jsonnet file. Please, check https://jsonnet.org/ for more | ||
| // information about the language. | ||
| // For the schema, see | ||
| // https://github.com/openSUSE/agama/blob/master/rust/agama-lib/share/profile.schema.json | ||
|
|
||
| // The "hw.libsonnet" file contains hardware information of the storage devices | ||
| // from the "lshw" tool. It is generated by running as root: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the most important information is that it is explicitly run by Agama itself, there is no magic for that.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I merged too soon. I opened #655. |
||
| // | ||
| // lshw -json -class disk | ||
| // | ||
| // However, it is expected to change in the near future to include information | ||
| // from other subsystems (e.g., network). | ||
| local agama = import 'hw.libsonnet'; | ||
|
|
||
| // Find the biggest disk which is suitable for installing the system. | ||
| local findBiggestDisk(disks) = | ||
| local sizedDisks = std.filter(function(d) std.objectHas(d, 'size'), disks); | ||
| local sorted = std.sort(sizedDisks, function(x) x.size); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.