Add flatpak option support

axtloss/rework-partitioning
axtlos 3 years ago
parent b9baec39c0
commit 1b05b6d203
No known key found for this signature in database
GPG Key ID: A468AFD71DD51D4A

@ -56,6 +56,10 @@ pub enum Command {
#[clap(name = "nix")]
Nix,
/// Install flatpak and enable flathub
#[clap(name = "flatpak")]
Flatpak,
/// Read jade installation config
#[clap(name = "config")]
Config {

@ -118,3 +118,10 @@ pub fn setup_timeshift() {
pub fn install_homemgr() {
install(vec!["nix"]);
}
pub fn install_flatpak() {
install(vec!["flatpak"]);
exec_eval(
exec_chroot("flatpak", vec![String::from("remote-add"), String::from("--if-not-exists"), String::from("flathub"), String::from("https://flathub.org/repo/flathub.flatpakrepo")]),
)
}

@ -14,7 +14,6 @@ pub fn install_desktop_setup(desktop_setup: DesktopSetup) {
DesktopSetup::Xfce => install_xfce(),
DesktopSetup::Enlightenment => install_enlightenment(),
DesktopSetup::None => log::debug!("No desktop setup selected"),
_ => crash("Unsupported desktop setup", 1),
}
install_networkmanager();
}

@ -15,6 +15,7 @@ struct Config {
rootpass: String,
desktop: Option<DesktopSetup>,
timeshift: bool,
flatpak: bool,
extra_packages: Vec<String>,
}
@ -144,6 +145,11 @@ pub fn read_config(configpath: PathBuf) {
if config.timeshift {
base::setup_timeshift();
}
println!();
log::info!("Enabling flatpak : {}", config.flatpak);
if config.flatpak {
base::setup_flatpak();
}
log::info!("Extra packages : {:?}", config.extra_packages);
let mut extra_packages: Vec<&str> = Vec::new();
for i in 0..config.extra_packages.len() {

@ -55,6 +55,9 @@ fn main() {
},
Command::Nix => {
base::install_homemgr();
},
Command::Flatpak => {
base::install_flatpak();
}
Command::Config { config } => {
crate::internal::config::read_config(config);

Loading…
Cancel
Save