try new password thing and add genfstab function

axtloss/rework-partitioning
amy 3 years ago
parent aa736b01d8
commit c0eef77d11

@ -39,6 +39,11 @@ jade bootloader grub-efi /boot/efi
jade bootloader grub-legacy /dev/sda
```
### generate fstab
```sh
jade genfstab
```
### configuring locale settings
```sh
# set the keyboard layout to colemak, the timezone to Europe/Berlin and set en_US.UTF-8 as the locale

@ -23,6 +23,13 @@ pub fn install_base_packages() {
]);
}
pub fn genfstab() {
exec_eval(
exec_chroot("genfstab", vec![String::from("-U"), String::from("/mnt")]),
"Generate fstab",
);
}
pub fn install_bootloader_efi(efidir: &str) {
install::install(vec!["grub", "efibootmgr"]);
exec_eval(

@ -5,6 +5,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
match desktop_setup {
"onyx" => {
install(vec![
"xorg",
"onyx",
"lightdm",
"lightdm-gtk-greeter",
@ -12,10 +13,11 @@ pub fn choose_pkgs(desktop_setup: &str) {
]);
}
"gnome" => {
install(vec!["gnome", "gnome-tweaks", "chrome-gnome-shell", "gdm"]);
install(vec!["xorg", "gnome", "gnome-tweaks", "chrome-gnome-shell", "gdm",]);
}
"kde" => {
install(vec![
"xorg",
"kde",
"plasma",
"plasma-wayland-session",
@ -25,6 +27,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
}
"budgie" => {
install(vec![
"xorg",
"budgie-desktop",
"gnome",
"lightdm",
@ -34,6 +37,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
}
"cinnamon" => {
install(vec![
"xorg",
"cinnamon",
"lightdm",
"lightdm-gtk-greeter",
@ -44,6 +48,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
}
"mate" => {
install(vec![
"xorg",
"mate",
"lightdm",
"lightdm-gtk-greeter",
@ -53,6 +58,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
}
"xfce" => {
install(vec![
"xorg",
"xfce4",
"lightdm",
"lightdm-gtk-greeter",
@ -62,6 +68,7 @@ pub fn choose_pkgs(desktop_setup: &str) {
}
"enlightenment" => {
install(vec![
"xorg",
"enlightenment",
"lightdm",
"lightdm-gtk-greeter",

@ -30,11 +30,13 @@ pub fn new_user(username: &str, hasroot: bool, password: &str) {
}
exec_eval(
exec_chroot(
"usermod",
"bash",
vec![
String::from("-c"),
String::from("usermod"),
String::from("--password"),
String::from("$(echo"),
format!("${}", password),
format!("${{{}}}", password),
String::from("|"),
String::from("openssl"),
String::from("passwd"),
@ -51,8 +53,10 @@ pub fn root_pass(root_pass: &str) {
println!("Setting root password to '{}'", root_pass);
exec_eval(
exec_chroot(
"usermod",
"bash",
vec![
String::from("-c"),
String::from("usermod"),
String::from("--password"),
String::from("$(echo"),
format!("${{{}}}", root_pass),

@ -34,6 +34,10 @@ fn main() {
SubCommand::with_name("install-base")
.about("Install base packages")
)
.subcommand(
SubCommand::with_name("genfstab")
.about("Generate fstab")
)
.subcommand(
SubCommand::with_name("bootloader")
.about("Install bootloader")

Loading…
Cancel
Save