Add missing tasks
Signed-off-by: trivernis <trivernis@protonmail.com>integration-not-installation
parent
d19f405911
commit
e27e798a38
@ -1,3 +1,5 @@
|
|||||||
def main [cfg] {
|
def main [cfg] {
|
||||||
echo "Running after creating users"
|
echo "Running after creating users"
|
||||||
|
$TRM_CONFIG | describe
|
||||||
|
$TRM_CONFIG
|
||||||
}
|
}
|
@ -1,15 +1,65 @@
|
|||||||
use serde::Serialize;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::tasks::{
|
use crate::tasks::{
|
||||||
BootloaderConfig, DesktopConfig, LocaleConfig, NetworkConfig, PartitionsConfig, UsersConfig,
|
BootloaderConfig, BootloaderPreset, DesktopConfig, ExtraPackages, Kernel, KernelConfig,
|
||||||
|
LocaleConfig, NetworkConfig, Partitions, PartitionsConfig, RootUserConfig, UnakiteConfig,
|
||||||
|
UsersConfig,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
pub local: LocaleConfig,
|
pub locale: LocaleConfig,
|
||||||
pub network: NetworkConfig,
|
pub network: NetworkConfig,
|
||||||
pub partitions: PartitionsConfig,
|
pub partitions: PartitionsConfig,
|
||||||
pub bootloader: BootloaderConfig,
|
pub bootloader: BootloaderConfig,
|
||||||
|
pub kernels: KernelConfig,
|
||||||
pub desktop: DesktopConfig,
|
pub desktop: DesktopConfig,
|
||||||
pub users: UsersConfig,
|
pub users: UsersConfig,
|
||||||
|
pub root_user: RootUserConfig,
|
||||||
|
pub unakite: Option<UnakiteConfig>,
|
||||||
|
pub extra_packages: ExtraPackages,
|
||||||
|
pub enable_timeshift: bool,
|
||||||
|
pub enable_flatpak: bool,
|
||||||
|
pub enable_zramd: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Config {
|
||||||
|
pub(crate) fn empty() -> Self {
|
||||||
|
Self {
|
||||||
|
locale: LocaleConfig {
|
||||||
|
locale: Vec::new(),
|
||||||
|
keymap: String::new(),
|
||||||
|
timezone: String::new(),
|
||||||
|
},
|
||||||
|
network: NetworkConfig {
|
||||||
|
hostname: String::new(),
|
||||||
|
ipv6_loopback: false,
|
||||||
|
},
|
||||||
|
partitions: PartitionsConfig {
|
||||||
|
device: PathBuf::new(),
|
||||||
|
efi_partition: false,
|
||||||
|
partitions: Partitions::Auto,
|
||||||
|
},
|
||||||
|
bootloader: BootloaderConfig {
|
||||||
|
preset: BootloaderPreset::GrubEfi,
|
||||||
|
location: PathBuf::new(),
|
||||||
|
},
|
||||||
|
kernels: KernelConfig {
|
||||||
|
default: Kernel(String::new()),
|
||||||
|
additional: Vec::new(),
|
||||||
|
},
|
||||||
|
desktop: DesktopConfig::KdePlasma,
|
||||||
|
users: UsersConfig { users: Vec::new() },
|
||||||
|
root_user: RootUserConfig {
|
||||||
|
password: String::new(),
|
||||||
|
},
|
||||||
|
unakite: None,
|
||||||
|
extra_packages: Vec::new(),
|
||||||
|
enable_timeshift: false,
|
||||||
|
enable_flatpak: false,
|
||||||
|
enable_zramd: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(ConfigureUnakiteScript {
|
||||||
|
file = "configure-unakite"
|
||||||
|
args = UnakiteConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct UnakiteConfig {
|
||||||
|
pub root: PathBuf,
|
||||||
|
pub old_root: PathBuf,
|
||||||
|
pub efidir: PathBuf,
|
||||||
|
pub bootdev: PathBuf,
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(InstallExtraPackagesScript {
|
||||||
|
file = "install-extra-packages"
|
||||||
|
args = ExtraPackages
|
||||||
|
});
|
||||||
|
|
||||||
|
pub type ExtraPackages = Vec<String>;
|
@ -0,0 +1,8 @@
|
|||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(InstallFlatpakScript {
|
||||||
|
file = "install-flatpak"
|
||||||
|
args = FlatpakConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
pub type FlatpakConfig = ();
|
@ -0,0 +1,17 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(InstallKernelsScript {
|
||||||
|
file = "install-kernels"
|
||||||
|
args = KernelConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct KernelConfig {
|
||||||
|
pub default: Kernel,
|
||||||
|
pub additional: Vec<Kernel>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct Kernel(pub String);
|
@ -0,0 +1,8 @@
|
|||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(InstallTimeshiftScript {
|
||||||
|
file = "install-timeshift"
|
||||||
|
args = TimeshiftConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
pub type TimeshiftConfig = ();
|
@ -0,0 +1,8 @@
|
|||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(InstallZRamDScript {
|
||||||
|
file = "install-zramd"
|
||||||
|
args = ZRamDConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
pub type ZRamDConfig = ();
|
@ -1,15 +1,29 @@
|
|||||||
mod configure_locale;
|
mod configure_locale;
|
||||||
mod configure_network;
|
mod configure_network;
|
||||||
|
mod configure_unakite;
|
||||||
mod create_partitions;
|
mod create_partitions;
|
||||||
mod install_base;
|
mod install_base;
|
||||||
mod install_bootloader;
|
mod install_bootloader;
|
||||||
mod install_desktop;
|
mod install_desktop;
|
||||||
|
mod install_extra_packages;
|
||||||
|
mod install_flatpak;
|
||||||
|
mod install_kernels;
|
||||||
|
mod install_timeshift;
|
||||||
|
mod install_zramd;
|
||||||
|
mod setup_root_user;
|
||||||
mod setup_users;
|
mod setup_users;
|
||||||
|
|
||||||
pub use configure_locale::*;
|
pub use configure_locale::*;
|
||||||
pub use configure_network::*;
|
pub use configure_network::*;
|
||||||
|
pub use configure_unakite::*;
|
||||||
pub use create_partitions::*;
|
pub use create_partitions::*;
|
||||||
pub use install_base::*;
|
pub use install_base::*;
|
||||||
pub use install_bootloader::*;
|
pub use install_bootloader::*;
|
||||||
pub use install_desktop::*;
|
pub use install_desktop::*;
|
||||||
|
pub use install_extra_packages::*;
|
||||||
|
pub use install_flatpak::*;
|
||||||
|
pub use install_kernels::*;
|
||||||
|
pub use install_timeshift::*;
|
||||||
|
pub use install_zramd::*;
|
||||||
|
pub use setup_root_user::*;
|
||||||
pub use setup_users::*;
|
pub use setup_users::*;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::script;
|
||||||
|
|
||||||
|
script!(SetupRootUserScript {
|
||||||
|
file = "setup-root-user"
|
||||||
|
args = RootUserConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct RootUserConfig {
|
||||||
|
pub password: String,
|
||||||
|
}
|
Loading…
Reference in New Issue