summaryrefslogtreecommitdiff
path: root/std.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-08-12 10:54:55 +0300
committerLars Wirzenius <liw@liw.fi>2023-08-12 11:18:23 +0300
commit01b875bb0f5ca7ef7ffac402685c5f6ba61366c4 (patch)
tree351bce8e22fd874405b446251264db25efc49bad /std.yml
parent88598723ae12bfe03b04b063803d7b5eec6656d0 (diff)
downloadv-i-01b875bb0f5ca7ef7ffac402685c5f6ba61366c4.tar.gz
feat: install wifi support on target system
Install iwd and wifi firmware on target system. Copy wifi credentials from installer to target. Sponsored-by: author
Diffstat (limited to 'std.yml')
-rw-r--r--std.yml40
1 files changed, 39 insertions, 1 deletions
diff --git a/std.yml b/std.yml
index e0ab762..08724a9 100644
--- a/std.yml
+++ b/std.yml
@@ -116,7 +116,30 @@
name: ifupdown
state: absent
- - name: "configure networkd"
+ - name: "enable the non-free-firmware component on bookworm"
+ when: debian_release != "bullseye"
+ apt_repository:
+ repo: "deb http://deb.debian.org/debian {{ debian_release}} non-free-firmware"
+ state: present
+ update_cache: yes
+
+ - name: "install iwd and firmware for wifi"
+ apt:
+ name:
+ - firmware-brcm80211
+ - firmware-iwlwifi
+ - firmware-libertas
+ - firmware-misc-nonfree
+ - firmware-realtek
+ - firmware-ti-connectivity
+ - iwd
+
+ - name: "enable iwd"
+ systemd:
+ name: iwd
+ enabled: yes
+
+ - name: "configure networkd for Ethernet"
copy:
content: |
[Match]
@@ -126,6 +149,21 @@
DHCP=yes
dest: /etc/systemd/network/external.network
+ - name: "configure networkd for wireless"
+ copy:
+ content: |
+ [Match]
+ Name=wlan*
+
+ [Network]
+ DHCP=yes
+ dest: /etc/systemd/network/wireless.network
+
+ - name: "copy wireless credentials from host to target"
+ copy:
+ src: /var/lib/iwd/
+ dest: /var/lib/iwd/
+
- name: "enable networkd"
systemd:
name: systemd-networkd