diff --git a/installs/desktop.toml b/installs/desktop.toml index 8b09546..f83b722 100644 --- a/installs/desktop.toml +++ b/installs/desktop.toml @@ -33,6 +33,9 @@ hostname = "navos" # Root password root_password = "root" +# Enable Bluetooth +bluetooth = true + [pkg] # Additional packages pkg = [ diff --git a/installs/full.toml b/installs/full.toml index 02e9c43..042ca84 100644 --- a/installs/full.toml +++ b/installs/full.toml @@ -33,6 +33,9 @@ hostname = "navos" # Root password root_password = "root" +# Enable Bluetooth +bluetooth = true + [pkg] # Additional packages pkg = [ diff --git a/src/config.rs b/src/config.rs index 4330d54..e6dffa1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -85,6 +85,8 @@ pub struct GeneralConfig { pub hostname: String, // Root password pub root_password: Option, + // Enable Bluetooth + pub bluetooth: Option } #[derive(Debug, Clone, Deserialize)] diff --git a/src/install/bluetooth.rs b/src/install/bluetooth.rs new file mode 100644 index 0000000..58d1ead --- /dev/null +++ b/src/install/bluetooth.rs @@ -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"); +} diff --git a/src/install/mod.rs b/src/install/mod.rs index 0fd2c54..bd785a2 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -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();