Merge pull request #20 from crystal-linux/development

Merge development into main
axtloss/rework-partitioning
axtloss 2 years ago committed by GitHub
commit 3c0a6aba98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,8 @@
# Maintainer: Matt C <matt[at]getcryst[dot]al> # Maintainer: Matt C <matt[at]getcryst[dot]al>
pkgname=jade pkgname=jade
pkgver=1.0.7 pkgver=1.0.8
pkgrel=3 pkgrel=1
pkgdesc="Scriptable backend & TUI Installer for Crystal Linux" pkgdesc="Scriptable backend & TUI Installer for Crystal Linux"
license=('GPL3') license=('GPL3')
arch=('x86_64') arch=('x86_64')

@ -61,6 +61,12 @@ jade networking getcryst.al
jade networking getcryst.al --ipv6 jade networking getcryst.al --ipv6
``` ```
### setup zramd
```sh
# install and enable zramd
jade zramd
```
### configure users ### configure users
```sh ```sh
# make a new user called nonRootHaver, without sudo, easytohack as the password and bash as the default shell # make a new user called nonRootHaver, without sudo, easytohack as the password and bash as the default shell

@ -2,11 +2,15 @@
"partition": { "partition": {
"device": "sda", "device": "sda",
"mode": "auto", "mode": "auto",
"efi": true "efi": true,
"partitions": [
"/home:sdb:btrfs" // This would be disk /dev/sdb, formatted with btrfs mounted at /home
] // this is only needed for manual partitioning, it would contain all the partitions for jade to use and the filesystem as well as mountpoint
// Note that the mountpoint has the root at the installation destination, so instead of /mnt/boot it would be /boot
}, },
"bootloader": { "bootloader": {
"type": "grub-efi", "type": "grub-efi", // for legacy this would be grub-legacy
"location": "/boot/efi" "location": "/boot/efi" // for efi this is the esp directory, for legacy boot this would be the device on which to install grub on
}, },
"locale": { "locale": {
"locale": [ "locale": [
@ -22,22 +26,33 @@
"users": [ "users": [
{ {
"name": "jade", "name": "jade",
"password": "jade", "password": "TaCVRgYCAHag6", // The password has to be encrypted with `openssl passwd -crypt <passord>`
"hasroot": true "hasroot": true,
"shell": "bash" // this can be either bash, csh, fish, tcsh or zsh. If a value is not recognized the default will be bash
}, },
{ { // Multiple users can be specified by just following this format
"name": "jade2", "name": "jade2",
"password": "jade2", "password": "TzSMi3EezsXZM",
"hasroot": false "hasroot": false,
"shell": "fish"
} }
], ],
"rootpass": "jaderoot", "rootpass": "3IwCDE/t39wuQ", // Same as other passwords, this has to be encrypted with `openssl passwd -crypt <password>`
"desktop": "onyx", "desktop": "onyx", // The desktop environment to install can be onyx, gnome, kde, mate, cinnamon, xfce, budgie, enlightenment, etc. for a full list check https://github.com/crystal-linux/jade/blob/main/src/internal/config.rs#L162
"timeshift": true, "timeshift": true, // Whether to enable timeshift as well as timeshift-autosnap, note that this may only work with root on btrfs
"zramd": true, // Whether to enable zramd
"extra_packages": [ "extra_packages": [
"firefox", "firefox",
"vim", "vim",
"git", "git",
"tmux" "tmux"
] ],
} "unakite": {
"enable": false, // Whether to install the recorvery partition, note that this currently is just a secondary smaller crystal installation
"root": "/dev/sda2", // The root partition for unakite
"oldroot": "/dev/sda3", // The root partition that the main crystal installation uses
"efidir": "/boot/efi", // The esp mountpoint in unakite, note that this is only read when using it on an efi system
"bootdev": "/dev/sda1" // the partition for the boot/efi partition
},
"kernel": "linux" // which kernel to install, available options are linux, linux-zen, linux-lts, linux-hardened. When an unknown option is passed it will default to linux
}

@ -45,6 +45,10 @@ pub enum Command {
#[clap(name = "networking")] #[clap(name = "networking")]
Networking(NetworkingArgs), Networking(NetworkingArgs),
/// Set up zramd
#[clap(name = "zramd")]
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!["zramd"]);
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);

@ -16,6 +16,7 @@ struct Config {
desktop: String, desktop: String,
timeshift: bool, timeshift: bool,
flatpak: bool, flatpak: bool,
zramd: bool,
extra_packages: Vec<String>, extra_packages: Vec<String>,
unakite: Unakite, unakite: Unakite,
kernel: String, kernel: String,
@ -135,6 +136,12 @@ pub fn read_config(configpath: PathBuf) {
} }
println!(); println!();
println!("---------"); println!("---------");
log::info!("Enabling zramd : {}", config.zramd);
if config.zramd {
base::install_zram();
}
println!();
println!("---------");
for i in 0..config.users.len() { for i in 0..config.users.len() {
log::info!("Creating user : {}", config.users[i].name); log::info!("Creating user : {}", config.users[i].name);
log::info!("Setting use password : {}", config.users[i].password); log::info!("Setting use password : {}", config.users[i].password);

@ -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