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>
pkgname=jade
pkgver=1.0.7
pkgrel=3
pkgver=1.0.8
pkgrel=1
pkgdesc="Scriptable backend & TUI Installer for Crystal Linux"
license=('GPL3')
arch=('x86_64')

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

@ -2,11 +2,15 @@
"partition": {
"device": "sda",
"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": {
"type": "grub-efi",
"location": "/boot/efi"
"type": "grub-efi", // for legacy this would be grub-legacy
"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": [
@ -22,22 +26,33 @@
"users": [
{
"name": "jade",
"password": "jade",
"hasroot": true
"password": "TaCVRgYCAHag6", // The password has to be encrypted with `openssl passwd -crypt <passord>`
"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",
"password": "jade2",
"hasroot": false
"password": "TzSMi3EezsXZM",
"hasroot": false,
"shell": "fish"
}
],
"rootpass": "jaderoot",
"desktop": "onyx",
"timeshift": true,
],
"rootpass": "3IwCDE/t39wuQ", // Same as other passwords, this has to be encrypted with `openssl passwd -crypt <password>`
"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, // 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": [
"firefox",
"vim",
"git",
"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")]
Networking(NetworkingArgs),
/// Set up zramd
#[clap(name = "zramd")]
Zram,
/// Configure users and passwords
#[clap(name = "users")]
Users {

@ -166,3 +166,14 @@ pub fn install_flatpak() {
"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");
}
fn install_onyx() {
/*fn install_onyx() {
install(vec![
"xorg",
"onyx",
@ -304,7 +304,7 @@ fn install_onyx() {
"Add lightdm greeter",
);
enable_dm("lightdm");
}
}*/
fn enable_dm(dm: &str) {
log::debug!("Enabling {}", dm);

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

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

Loading…
Cancel
Save