Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Jul 15, 2024
1 parent 06add94 commit 4f0e609
Showing 1 changed file with 98 additions and 36 deletions.
134 changes: 98 additions & 36 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,27 +264,33 @@
"type": "object",
"additionalProperties": false,
"properties": {
"search": {
"title": "Search a device by its name",
"$ref": "#/$defs/search"
},
"encrypt": {
"title": "",
"title": "Encryption options",
"description": "The device is encrypted only if the current partitions are deleted and no new partitions are created",
"$ref": "#/$defs/encrypt"
},
"format": {
"title": "",
"title": "Format options",
"description": "The device is formatted only if the current partitions are deleted and no new partitions are created",
"$ref": "#/$defs/format"
},
"mount": {
"title": "",
"title": "Mount options",
"description": "The device is mounted only if it is formatted",
"$ref": "#/$defs/mount"
},
"ptableType": {
"title": "",
"type": "enum"
"title": "The partition table is created only if all the current partitions are deleted",
"enum": ["gpt", "msdos", "dasd"]
},
"partitions": {
"title": "",
"title": "Manage partitions",
"type": "array",
"items": {
"title": "",
"$ref": "#/$defs/partition"
}
}
Expand Down Expand Up @@ -462,35 +468,7 @@
},
"filesystem": {
"title": "File system of the volume",
"anyOf": [
{
"title": "File system type",
"enum": [
"bcachefs", "btrfs", "exfat", "ext2", "ext3", "ext4", "f2fs", "jfs",
"nfs", "nilfs2", "ntfs", "reiserfs", "swap", "tmpfs", "vfat", "xfs"
]
},
{
"title": "Btrfs file system",
"description": "Indicates properties of the Btrfs file system",
"type": "object",
"additionalProperties": false,
"required": ["btrfs"],
"properties": {
"btrfs": {
"title": "Specification of a Btrfs file system",
"type": "object",
"additionalProperties": false,
"properties": {
"snapshots": {
"title": "Whether Btrfs snapshots should be configured",
"type": "boolean"
}
}
}
}
}
]
"$ref": "#/$defs/filesystemValue"
},
"size": {
"title": "Size limits",
Expand Down Expand Up @@ -623,6 +601,90 @@
{ "$ref": "#/$defs/sizeString" },
{ "$ref": "#/$defs/sizeInteger" }
]
},
"filesystemValue": {
"anyOf": [
{
"title": "File system type",
"enum": [
"bcachefs", "btrfs", "exfat", "ext2", "ext3", "ext4", "f2fs", "jfs",
"nfs", "nilfs2", "ntfs", "reiserfs", "swap", "tmpfs", "vfat", "xfs"
]
},
{
"title": "Btrfs file system",
"description": "Indicates properties of the Btrfs file system",
"type": "object",
"additionalProperties": false,
"required": ["btrfs"],
"properties": {
"btrfs": {
"title": "Specification of a Btrfs file system",
"type": "object",
"additionalProperties": false,
"properties": {
"snapshots": {
"title": "Whether Btrfs snapshots should be configured",
"type": "boolean"
}
}
}
}
}
]
},
"search": {
"title": "Searching options",
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
"title": "Device name",
"type": "string"
}
}
},
"encrypt": {
"title": "Encryption options",
"type": "object",
"additionalProperties": false,
"required": ["key"],
"properties": {
"key": {
"title": "Passphrase to use when creating new encryption devices",
"type": "string"
},
"method": {
"title": "Method used to create the encryption devices",
"enum": ["luks2", "tpm_fde"]
},
"pbkdFunction": {
"title": "Password-based key derivation function to use for LUKS2",
"enum": ["pbkdf2", "argon2i", "argon2id"]
}
}
},
"format": {
"title": "Format options",
"type": "object",
"additionalProperties": false,
"required": ["filesystem"],
"properties": {
"filesystem": {
"title": "File system to use for formatting the device",
"$ref": "#/$defs/filesystemValue"
},
"label": {
"title": "File system label",
"type": "string"
},
"mkfsOptions": {
"title": "Options for creating the file system",
"type": "array",
"items": { "type": "string" }
}
}
}
}
}

0 comments on commit 4f0e609

Please sign in to comment.