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_password = "root"
|
root_password = "root"
|
||||||
|
|
||||||
|
# Enable Bluetooth
|
||||||
|
bluetooth = true
|
||||||
|
|
||||||
[pkg]
|
[pkg]
|
||||||
# Additional packages
|
# Additional packages
|
||||||
pkg = [
|
pkg = [
|
||||||
|
|
|
@ -33,6 +33,9 @@ hostname = "navos"
|
||||||
# Root password
|
# Root password
|
||||||
root_password = "root"
|
root_password = "root"
|
||||||
|
|
||||||
|
# Enable Bluetooth
|
||||||
|
bluetooth = true
|
||||||
|
|
||||||
[pkg]
|
[pkg]
|
||||||
# Additional packages
|
# Additional packages
|
||||||
pkg = [
|
pkg = [
|
||||||
|
|
|
@ -85,6 +85,8 @@ pub struct GeneralConfig {
|
||||||
pub hostname: String,
|
pub hostname: String,
|
||||||
// Root password
|
// Root password
|
||||||
pub root_password: Option<String>,
|
pub root_password: Option<String>,
|
||||||
|
// Enable Bluetooth
|
||||||
|
pub bluetooth: Option<bool>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[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
|
// DRIVE SELECTION
|
||||||
|
|
||||||
|
use bluetooth::setup_bluetooth;
|
||||||
use boot::setup_bootloader;
|
use boot::setup_bootloader;
|
||||||
use desktop::setup_desktop;
|
use desktop::setup_desktop;
|
||||||
use docker::setup_docker;
|
use docker::setup_docker;
|
||||||
|
@ -33,6 +34,7 @@ pub mod ssh;
|
||||||
pub mod user;
|
pub mod user;
|
||||||
pub mod virt;
|
pub mod virt;
|
||||||
pub mod zram;
|
pub mod zram;
|
||||||
|
pub mod bluetooth;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::InstallConfig,
|
config::InstallConfig,
|
||||||
|
@ -130,6 +132,11 @@ pub fn install(conf: InstallConfig) {
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_zram();
|
setup_zram();
|
||||||
|
|
||||||
|
if conf.general.bluetooth.unwrap_or_default() {
|
||||||
|
setup_bluetooth();
|
||||||
|
}
|
||||||
|
|
||||||
setup_mkinitcpio(&conf.drive);
|
setup_mkinitcpio(&conf.drive);
|
||||||
setup_secure_boot();
|
setup_secure_boot();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue