Add zramd option

axtloss/rework-partitioning
axtloss 2 years ago
parent 8b7eac77ba
commit 33298ebf1d

@ -45,6 +45,10 @@ pub enum Command {
#[clap(name = "networking")] #[clap(name = "networking")]
Networking(NetworkingArgs), Networking(NetworkingArgs),
/// Set up zram
#[clap(name = "zram")]
Zram,
/// Configure users and passwords /// Configure users and passwords
#[clap(name = "users")] #[clap(name = "users")]
Users { Users {

@ -166,3 +166,14 @@ pub fn install_flatpak() {
"add flathub remote", "add flathub remote",
) )
} }
pub fn install_zram() {
install(vec!["zram"]);
exec_eval(
exec_chroot(
"systemctl",
vec![String::from("enable"), String::from("zramd")],
),
"Enable zramd service",
);
}

@ -287,7 +287,7 @@ fn install_gnome() {
enable_dm("gdm"); enable_dm("gdm");
} }
fn install_onyx() { /*fn install_onyx() {
install(vec![ install(vec![
"xorg", "xorg",
"onyx", "onyx",
@ -304,7 +304,7 @@ fn install_onyx() {
"Add lightdm greeter", "Add lightdm greeter",
); );
enable_dm("lightdm"); enable_dm("lightdm");
} }*/
fn enable_dm(dm: &str) { fn enable_dm(dm: &str) {
log::debug!("Enabling {}", dm); log::debug!("Enabling {}", dm);

@ -51,6 +51,9 @@ fn main() {
} }
network::set_hostname(&args.hostname); network::set_hostname(&args.hostname);
} }
Command::Zram => {
base::install_zram();
}
Command::Users { subcommand } => match subcommand { Command::Users { subcommand } => match subcommand {
UsersSubcommand::NewUser(args) => { UsersSubcommand::NewUser(args) => {
users::new_user( users::new_user(

Loading…
Cancel
Save