Add script definitions for all base tasks
Signed-off-by: trivernis <trivernis@protonmail.com>integration-not-installation
parent
2b6e663f54
commit
662d3f749c
@ -0,0 +1,15 @@
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::script;
|
||||
|
||||
script!(ConfigureLocaleScript {
|
||||
file = "configure-locale.nu"
|
||||
args = LocaleConfig
|
||||
});
|
||||
|
||||
#[derive(Clone, Serialize, Debug)]
|
||||
pub struct LocaleConfig {
|
||||
pub locale: Vec<String>,
|
||||
pub keymap: String,
|
||||
pub timezone: String,
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::script;
|
||||
|
||||
script!(ConfigureNetworkScript {
|
||||
file = "configure-network.nu"
|
||||
args = NetworkConfig
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct NetworkConfig {
|
||||
pub hostname: String,
|
||||
pub ipv6_loopback: bool,
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::script;
|
||||
|
||||
script!(CreatePartitionsScript {
|
||||
file = "create-partitions.nu"
|
||||
args = PartitionsConfig
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct PartitionsConfig {
|
||||
pub device: PathBuf,
|
||||
pub efi_partition: bool,
|
||||
pub partitions: Partitions,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub enum Partitions {
|
||||
Auto,
|
||||
Manual(Vec<Partition>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct Partition {
|
||||
pub mountpoint: PathBuf,
|
||||
pub blockdevice: PathBuf,
|
||||
pub filesystem: Option<FileSystem>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub enum FileSystem {
|
||||
VFAT,
|
||||
BFS,
|
||||
CramFS,
|
||||
Ext2,
|
||||
Ext3,
|
||||
Ext4,
|
||||
FAT,
|
||||
MSDOS,
|
||||
XFS,
|
||||
BTRFS,
|
||||
Minix,
|
||||
F2FS,
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
use crate::script;
|
||||
|
||||
script!(InstallBaseScript {
|
||||
file = "install-base.nu"
|
||||
args = InstallBaseArgs
|
||||
});
|
||||
|
||||
type InstallBaseArgs = ();
|
@ -0,0 +1,22 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::script;
|
||||
|
||||
script!(InstallBootloaderScript {
|
||||
file = "install-bootloader.nu"
|
||||
args = BooloaderConfig
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct BooloaderConfig {
|
||||
preset: BootloaderPreset,
|
||||
location: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub enum BootloaderPreset {
|
||||
GrubEfi,
|
||||
Legacy,
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::script;
|
||||
|
||||
script!(InstallDesktopScript {
|
||||
file = "install-desktop.nu"
|
||||
args = DesktopConfig
|
||||
});
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub enum DesktopConfig {
|
||||
Onyx,
|
||||
KdePlasma,
|
||||
Mate,
|
||||
Gnome,
|
||||
Cinnamon,
|
||||
Xfce,
|
||||
Budgie,
|
||||
Enlightenment,
|
||||
Lxqt,
|
||||
Sway,
|
||||
I3Gaps,
|
||||
HerbstluftWM,
|
||||
AwesomeWM,
|
||||
BSPWM,
|
||||
}
|
Loading…
Reference in New Issue