load config from efi

This commit is contained in:
metamuffin 2024-11-09 05:13:41 +01:00
parent 4a5387acac
commit 0933533801
No known key found for this signature in database
GPG key ID: 718F9749DCDBD654
9 changed files with 31 additions and 5 deletions

4
a.md Normal file
View file

@ -0,0 +1,4 @@
- 97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38-WlanSSID
- 97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38-WlanPSK
- 97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38-AppUrl

View file

@ -1,9 +1,6 @@
[Match] [Match]
Type=ether Type=ether
[Link]
RequiredForOnline=routable
[Network] [Network]
DHCP=yes DHCP=yes
MulticastDNS=yes MulticastDNS=yes

View file

@ -0,0 +1,6 @@
[Match]
Type=wlan
[Network]
DHCP=yes
MulticastDNS=yes

View file

@ -12,7 +12,7 @@ Requires=dev-dri-card1.device
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/cage -d -- chromium --ozone-platform=wayland --app='https://staging.metamuffin.org/' ExecStart=/usr/bin/fish -c '/usr/bin/cage -d -- electron --ozone-platform=wayland (cat /sys/firmware/efi/efivars/AppUrl-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5)'
Restart=always Restart=always
User=abrechenbarkeit User=abrechenbarkeit
UtmpIdentifier=%I UtmpIdentifier=%I

View file

@ -0,0 +1,11 @@
[Unit]
Description=Generate wpa_supplicant config from EFI variables
After=systemd-user-sessions.service
Before=wpa_supplicant.service
[Service]
Type=simple
ExecStart=/usr/local/bin/configure_wpa
[Install]
WantedBy=network-online.target

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/wpa_supplicant.service

View file

@ -0,0 +1,5 @@
#!/usr/bin/fish
set ssid (cat /sys/firmware/efi/efivars/WlanSSID-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5)
set psk (cat /sys/firmware/efi/efivars/WlanPSK-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5)
wpa_passphrase $ssid $psk > /etc/wpa_supplicant/wpa_supplicant.conf

View file

@ -9,8 +9,9 @@ qemu-guest-agent
cage cage
edk2-shell edk2-shell
fish fish
chromium
pipewire pipewire
pipewire-alsa pipewire-alsa
pipewire-jack pipewire-jack
pipewire-pulse pipewire-pulse
wpa_supplicant
efivar

View file

@ -16,4 +16,5 @@ airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '10')
bootstrap_tarball_compression=(zstd -c -T0 --long -19) bootstrap_tarball_compression=(zstd -c -T0 --long -19)
file_permissions=( file_permissions=(
["/etc/shadow"]="0:0:400" ["/etc/shadow"]="0:0:400"
["/usr/local/bin/configure_wpa"]="0:0:755"
) )