Skip to content

Commit

Permalink
Add mods for nymea
Browse files Browse the repository at this point in the history
  • Loading branch information
mzanetti committed Feb 21, 2023
1 parent 5d044ba commit f00429d
Show file tree
Hide file tree
Showing 17 changed files with 148 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
deploy/*
work/*
config
postrun.sh
SKIP
SKIP_IMAGES
.pc
*-pc
apt-cacher-ng/
5 changes: 5 additions & 0 deletions config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
IMG_NAME=nymea-bullseye
FIRST_USER_NAME="nymea"
FIRST_USER_PASS="nymea"
ENABLE_SSH=1
STAGE_LIST="stage0 stage1 stage2 nymea nymea-kiosk"
11 changes: 11 additions & 0 deletions nymea-kiosk/00-sys-tweaks/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rotate internal display by default
echo lcd_rotate=2 >> /boot/config.txt

# Enable fake KMS driver, the real kms causes issues
sed -i 's/vc4-kms-v3d/vc4-fkms-v3d/' /boot/config.txt

# Get away with the low voltage warning
echo avoid_warnings=1 >> /boot/config.txt

# Hide console log messages and blinking cursor and activate the splash
sed -i "s/console=tty1/console=tty3 quiet vt.global_cursor_default=0 splash/" "/boot/cmdline.txt"
2 changes: 2 additions & 0 deletions nymea-kiosk/01-packages/05-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nymea-app-kiosk-wayland
nymea-splashscreen
4 changes: 4 additions & 0 deletions nymea-kiosk/EXPORT_IMAGE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
IMG_SUFFIX="-kiosk"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
5 changes: 5 additions & 0 deletions nymea-kiosk/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi
70 changes: 70 additions & 0 deletions nymea/00-sys-tweaks/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Add nymea repository
echo -e "\n## nymea repo\ndeb http://repository.nymea.io bullseye rpi\n#deb-src http://repository.nymea.io bullseye rpi" | tee /etc/apt/sources.list.d/nymea.list
wget -qO - http://repository.nymea.io/Repository.key | apt-key add -

# Set repository priority (prefer packages from raspbian section)
cat <<EOM >/etc/apt/preferences.d/nymea
Package: *
Pin: release c=raspios
Pin-Priority: 700
Package: *
Pin: origin repository.nymea.io c=main
Pin-Priority: 500
EOM

apt-get update

cat <<EOM > /etc/motd
.
++,
|\`--\`+-.
\`\`--\`-++. .;;+.
\\\`\`--*++++;;;/@\\ _ __ _ _ _ __ ___ ___ __ _
\\\`*#;.++++\\;+|/ | '_ \| | | | '_ \` _ \\ / _ \\/ _\` |
\`-###+++++;\` | | | | |_| | | | | | | __/ (_| |
/###+++ |_| |_|\__, |_| |_| |_|\___|\__,_|
|+++#\` __/ |
\`###+. |___/
\`###+
\`#+
\`
EOM


cat <<EOM > /etc/machine-info
PRETTY_HOSTNAME=nymea
EOM

cat <<EOM > /etc/issue.net
nymea - nymea.io | Debian GNU/Linux 11
EOM

cat <<EOM > /etc/issue
nymea - nymea.io | Debian GNU/Linux 11 \n \l
EOM

# Change hostname to nymea
echo nymea > /etc/hostname
sed -i 's/localhost/localhost nymea/' /etc/hosts

# Enable i2c
echo dtparam=i2c_arm=on >> /boot/config.txt
echo i2c-dev >> /etc/modules

# Enable UART (For RaspBee and similar headers)
echo enable_uart=1 >> /boot/config.txt
sed -i 's/console=serial0,115200 //' /boot/cmdline.txt

# Drop packages conflicting with network-manager
apt-get purge --yes openresolv dhcpcd5

# Disable BlueZ plugins QtBluetooth can't deal with
mkdir /etc/systemd/system/bluetooth.service.d
cat <<EOM > /etc/systemd/system/bluetooth.service.d/01-disable-battery-plugin.conf
[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=battery,sap
EOM
42 changes: 42 additions & 0 deletions nymea/01-packages/05-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
nymea
nymea-plugin-anel
nymea-plugin-aqi
nymea-plugin-bose
nymea-plugin-datetime
nymea-plugin-daylightsensor
nymea-plugin-denon
nymea-plugin-doorbird
nymea-plugin-flowercare
nymea-plugin-fronius
nymea-plugin-gpio
nymea-plugin-homeconnect
nymea-plugin-keba
nymea-plugin-kodi
nymea-plugin-lifx
nymea-plugin-mailnotification
nymea-plugin-mystrom
nymea-plugin-nanoleaf
nymea-plugin-netatmo
nymea-plugin-networkdetector
nymea-plugin-openuv
nymea-plugin-openweathermap
nymea-plugin-philipshue
nymea-plugin-pushbullet
nymea-plugin-pushnotifications
nymea-plugin-shelly
nymea-plugin-sma
nymea-plugin-solarlog
nymea-plugin-somfytahoma
nymea-plugin-sonos
nymea-plugin-tado
nymea-plugin-tasmota
nymea-plugin-telegram
nymea-plugin-tplink
nymea-plugin-unifi
nymea-plugin-yamahaavr
nymea-plugins-zigbee
nymea-plugins-zwave
nymea-plugins-genericthings
nymea-networkmanager
nymea-experience-plugin-energy
systemd-timesyncd
4 changes: 4 additions & 0 deletions nymea/EXPORT_IMAGE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
IMG_SUFFIX="-core"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
5 changes: 5 additions & 0 deletions nymea/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi
Empty file added stage2/SKIP_IMAGES
Empty file.
Empty file added stage3/SKIP
Empty file.
Empty file added stage3/SKIP_IMAGES
Empty file.
Empty file added stage4/SKIP
Empty file.
Empty file added stage4/SKIP_IMAGES
Empty file.
Empty file added stage5/SKIP
Empty file.
Empty file added stage5/SKIP_IMAGES
Empty file.

0 comments on commit f00429d

Please sign in to comment.