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 jade bootloader grub-legacy /dev/sda
``` ```
### generate fstab
```sh
jade genfstab
```
### configuring locale settings ### configuring locale settings
```sh ```sh
# set the keyboard layout to colemak, the timezone to Europe/Berlin and set en_US.UTF-8 as the locale # 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) { pub fn install_bootloader_efi(efidir: &str) {
install::install(vec!["grub", "efibootmgr"]); install::install(vec!["grub", "efibootmgr"]);
exec_eval( exec_eval(

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

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

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

Loading…
Cancel
Save