api/disk-templates: adopt directory structure from clan modules
This commit is contained in:
23
templates/disk/single-disk/README.md
Normal file
23
templates/disk/single-disk/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
description = "Simple single disk schema"
|
||||
---
|
||||
# Description
|
||||
|
||||
This schema defines a GPT-based disk layout.
|
||||
|
||||
### **Disk Overview**
|
||||
|
||||
- **Name**: `main-{{uuid}}`
|
||||
- **Device**: `{{mainDisk}}`
|
||||
|
||||
### **Partitions**
|
||||
|
||||
1. **EFI System Partition (ESP)**
|
||||
- Size: `500M`.
|
||||
- Filesystem: `vfat`.
|
||||
- Mount Point: `/boot` (secure `umask=0077`).
|
||||
|
||||
2. **Root Partition**
|
||||
- Size: Remaining disk space (`100%`).
|
||||
- Filesystem: `ext4`.
|
||||
- Mount Point: `/`.
|
||||
34
templates/disk/single-disk/default.nix
Normal file
34
templates/disk/single-disk/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
name = "main-{{uuid}}";
|
||||
device = "{{mainDisk}}";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "500M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user