98 lines
1.7 KiB
TypeScript
98 lines
1.7 KiB
TypeScript
/**
|
|
* Configuration interface for ISO customization
|
|
*/
|
|
|
|
export interface IIsoConfig {
|
|
version: string;
|
|
|
|
// Base ISO settings
|
|
iso: {
|
|
ubuntu_version: string; // e.g., "24.04", "22.04"
|
|
architecture: 'amd64' | 'arm64';
|
|
flavor?: 'server' | 'desktop'; // default: server
|
|
};
|
|
|
|
// Output settings
|
|
output: {
|
|
filename: string;
|
|
path: string;
|
|
};
|
|
|
|
// Network configuration
|
|
network?: {
|
|
wifi?: {
|
|
ssid: string;
|
|
password: string;
|
|
security?: 'wpa2' | 'wpa3';
|
|
hidden?: boolean;
|
|
};
|
|
};
|
|
|
|
// Cloud-init configuration
|
|
cloud_init?: ICloudInitConfig;
|
|
|
|
// Custom boot scripts
|
|
boot_scripts?: Array<{
|
|
name: string;
|
|
path: string;
|
|
enable?: boolean;
|
|
}>;
|
|
|
|
// Pre-install packages (requires longer build time)
|
|
preinstall?: {
|
|
enabled: boolean;
|
|
packages: string[];
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Cloud-init configuration interface
|
|
*/
|
|
export interface ICloudInitConfig {
|
|
hostname?: string;
|
|
|
|
// Users
|
|
users?: Array<{
|
|
name: string;
|
|
ssh_authorized_keys?: string[];
|
|
sudo?: string;
|
|
shell?: string;
|
|
groups?: string[];
|
|
lock_passwd?: boolean;
|
|
passwd?: string; // Hashed password
|
|
}>;
|
|
|
|
// Packages to install on first boot
|
|
packages?: string[];
|
|
|
|
// Package update/upgrade
|
|
package_update?: boolean;
|
|
package_upgrade?: boolean;
|
|
|
|
// Run commands on first boot
|
|
runcmd?: string[];
|
|
|
|
// Write files
|
|
write_files?: Array<{
|
|
path: string;
|
|
content: string;
|
|
owner?: string;
|
|
permissions?: string;
|
|
}>;
|
|
|
|
// Timezone
|
|
timezone?: string;
|
|
|
|
// Locale
|
|
locale?: string;
|
|
|
|
// SSH settings
|
|
ssh?: {
|
|
password_authentication?: boolean;
|
|
permit_root_login?: boolean;
|
|
};
|
|
|
|
// Additional cloud-init directives
|
|
[key: string]: unknown;
|
|
}
|