add bluetooth support
This commit is contained in:
parent
227b97b27f
commit
12b2cf4a96
5 changed files with 22 additions and 0 deletions
|
@ -33,6 +33,9 @@ hostname = "navos"
|
|||
# Root password
|
||||
root_password = "root"
|
||||
|
||||
# Enable Bluetooth
|
||||
bluetooth = true
|
||||
|
||||
[pkg]
|
||||
# Additional packages
|
||||
pkg = [
|
||||
|
|
|
@ -33,6 +33,9 @@ hostname = "navos"
|
|||
# Root password
|
||||
root_password = "root"
|
||||
|
||||
# Enable Bluetooth
|
||||
bluetooth = true
|
||||
|
||||
[pkg]
|
||||
# Additional packages
|
||||
pkg = [
|
||||
|
|
|
@ -85,6 +85,8 @@ pub struct GeneralConfig {
|
|||
pub hostname: String,
|
||||
// Root password
|
||||
pub root_password: Option<String>,
|
||||
// Enable Bluetooth
|
||||
pub bluetooth: Option<bool>
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
|
|
7
src/install/bluetooth.rs
Normal file
7
src/install/bluetooth.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
use crate::{linux::systemd_service_enable, pkg::install_pkgs};
|
||||
|
||||
/// Enable Bluetooth
|
||||
pub fn setup_bluetooth() {
|
||||
install_pkgs(&["bluez", "bluez-utils"]);
|
||||
systemd_service_enable("bluetooth.service");
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
// DRIVE SELECTION
|
||||
|
||||
use bluetooth::setup_bluetooth;
|
||||
use boot::setup_bootloader;
|
||||
use desktop::setup_desktop;
|
||||
use docker::setup_docker;
|
||||
|
@ -33,6 +34,7 @@ pub mod ssh;
|
|||
pub mod user;
|
||||
pub mod virt;
|
||||
pub mod zram;
|
||||
pub mod bluetooth;
|
||||
|
||||
use crate::{
|
||||
config::InstallConfig,
|
||||
|
@ -130,6 +132,11 @@ pub fn install(conf: InstallConfig) {
|
|||
}
|
||||
|
||||
setup_zram();
|
||||
|
||||
if conf.general.bluetooth.unwrap_or_default() {
|
||||
setup_bluetooth();
|
||||
}
|
||||
|
||||
setup_mkinitcpio(&conf.drive);
|
||||
setup_secure_boot();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue