Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/config-sample.json22
-rw-r--r--examples/custom-command-sample.json1
-rw-r--r--examples/interactive_installation.py22
3 files changed, 14 insertions, 31 deletions
diff --git a/examples/config-sample.json b/examples/config-sample.json
index 38415b2c..ed1cc38e 100644
--- a/examples/config-sample.json
+++ b/examples/config-sample.json
@@ -2,7 +2,7 @@
"config_version": "2.5.2",
"additional-repositories": [],
"archinstall-language": "English",
- "audio": "pipewire",
+ "audio_config": {"audio": "pipewire"},
"bootloader": "Systemd-boot",
"debug": false,
"disk_config": {
@@ -99,19 +99,13 @@
"http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch": true,
}
},
- "network_config": {
- "nics": [
- {
- "dhcp": false,
- "dns": [
- "3.3.3.3"
- ],
- "gateway": "2.2.2.2",
- "iface": "enp0s31f6",
- "ip": "1.1.1.1"
- }
- ],
- "type": "manual"
+ "nic": {
+ "dhcp": true,
+ "dns": null,
+ "gateway": null,
+ "iface": null,
+ "ip": null,
+ "type": "nm"
},
"no_pkg_lookups": false,
"ntp": true,
diff --git a/examples/custom-command-sample.json b/examples/custom-command-sample.json
index b2250e2c..34d63d74 100644
--- a/examples/custom-command-sample.json
+++ b/examples/custom-command-sample.json
@@ -1,6 +1,5 @@
{
"dry_run": true,
- "audio": "none",
"bootloader": "systemd-bootctl",
"debug": false,
"harddrives": [
diff --git a/examples/interactive_installation.py b/examples/interactive_installation.py
index 8e82ca7e..e075df9b 100644
--- a/examples/interactive_installation.py
+++ b/examples/interactive_installation.py
@@ -1,12 +1,11 @@
from pathlib import Path
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, Optional
import archinstall
from archinstall import Installer
from archinstall import profile
from archinstall import SysInfo
from archinstall import mirrors
-from archinstall.default_profiles.applications.pipewire import PipewireProfile
from archinstall import disk
from archinstall import menu
from archinstall import models
@@ -49,7 +48,7 @@ def ask_user_questions():
global_menu.enable('profile_config')
# Ask about audio server selection if one is not already set
- global_menu.enable('audio')
+ global_menu.enable('audio_config')
# Ask for preferred kernel:
global_menu.enable('kernels', mandatory=True)
@@ -151,20 +150,11 @@ def perform_installation(mountpoint: Path):
if users := archinstall.arguments.get('!users', None):
installation.create_users(users)
- if audio := archinstall.arguments.get('audio', None):
- info(f'Installing audio server: {audio}')
- if audio == 'pipewire':
- PipewireProfile().install(installation)
- elif audio == 'pulseaudio':
- installation.add_additional_packages("pulseaudio")
-
- if SysInfo.requires_sof_fw():
- installation.add_additional_packages('sof-firmware')
-
- if SysInfo.requires_alsa_fw():
- installation.add_additional_packages('alsa-firmware')
+ audio_config: Optional[models.AudioConfiguration] = archinstall.arguments.get('audio_config', None)
+ if audio_config:
+ audio_config.install_audio_config(installation)
else:
- info("No audio server will be installed.")
+ info("No audio server will be installed")
if profile_config := archinstall.arguments.get('profile_config', None):
profile.profile_handler.install_profile_config(installation, profile_config)