add bluetooth support

This commit is contained in:
JMARyA 2025-01-09 23:04:35 +01:00
parent 227b97b27f
commit 12b2cf4a96
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 22 additions and 0 deletions

View file

@ -33,6 +33,9 @@ hostname = "navos"
# Root password
root_password = "root"
# Enable Bluetooth
bluetooth = true
[pkg]
# Additional packages
pkg = [

View file

@ -33,6 +33,9 @@ hostname = "navos"
# Root password
root_password = "root"
# Enable Bluetooth
bluetooth = true
[pkg]
# Additional packages
pkg = [

View file

@ -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
View 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");
}

View file

@ -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();