Compare commits

..

4 commits

8 changed files with 25 additions and 45 deletions

View file

@ -40,7 +40,10 @@ def mqtt_out(message, level="INFO", device=None):
key = "infobeamer"
if device:
key += f"/{device['id']}"
message = f"[{device['description']}] {message}"
if device["description"]:
message = f"[{device['description']}] {message}"
else:
message = f"[{device['serial']}] {message}"
client.publish(
CONFIG["mqtt"]["topic"],

View file

@ -32,21 +32,9 @@ Include = /etc/pacman.d/mirrorlist
Server = ${node.metadata.get('pacman/repository')}
Include = /etc/pacman.d/mirrorlist
% endif
% if node.metadata.get('pacman/enable_aurto', True):
% if node.metadata.get('pacman/enable_aurto'):
[aurto]
Server = https://aurto.kunbox.net/
SigLevel = Optional TrustAll
% endif
% if node.has_bundle('zfs'):
[archzfs]
Server = http://archzfs.com/archzfs/x86_64
% if node.metadata.get('pacman/linux-lts', False):
[zfs-linux-lts]
% else:
[zfs-linux]
% endif
Server = http://kernels.archzfs.com/$repo/
% endif

View file

@ -33,6 +33,7 @@ svc_systemd['paccache.timer'] = {
}
pkg_pacman = {
'acpi_call-lts': {},
'at': {},
'autoconf': {},
'automake': {},
@ -61,6 +62,7 @@ pkg_pacman = {
'ldns': {},
'less': {},
'libtool': {},
'linux-lts': {},
'logrotate': {},
'lsof': {},
'm4': {},
@ -102,12 +104,6 @@ pkg_pacman = {
'zip': {},
}
if node.metadata.get('pacman/linux-lts', False):
pkg_pacman['linux-lts'] = {}
pkg_pacman['acpi_call-lts'] = {}
else:
pkg_pacman['linux'] = {}
pkg_pacman['acpi_call'] = {}
for pkg, config in node.metadata.get('pacman/packages', {}).items():
pkg_pacman[pkg] = config

View file

@ -4,6 +4,7 @@ defaults = {
'glibc',
'pacman',
},
'enable_aurto': True,
'no_extract': {
'etc/cron.d/0hourly',
# don't install systemd-homed pam module. It produces a lot of spam in

View file

@ -2,6 +2,9 @@ from json import dumps
from bundlewrap.metadata import MetadataJSONEncoder
if node.has_bundle('pacman'):
assert node.metadata.get('pacman/enable_aurto'), f'{node.name}: bundle:zfs needs aurto for zfs-linux-lts package'
files = {
'/etc/modprobe.d/zfs.conf': {
'source': 'zfs-modprobe.conf',

View file

@ -48,6 +48,12 @@ defaults = {
'etc/sudoers.d/zfs',
},
'packages': {
'zfs-linux-lts': {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
'zfs-utils': {
'needed_by': {
'svc_systemd:zfs-zed',
@ -121,27 +127,6 @@ if node.has_bundle('telegraf'):
}
@metadata_reactor.provides(
'pacman/packages',
)
def packages(metadata):
if node.metadata.get('pacman/linux-lts', False):
pkgname = 'zfs-linux-lts'
else:
pkgname = 'zfs-linux'
return {
'pacman': {
'packages': {
pkgname: {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
},
},
}
@metadata_reactor.provides(
'apt/packages',
)

View file

@ -177,6 +177,10 @@ nodes['home.nas'] = {
},
'samba': {
'shares': {
'TV': {
'path': '/storage/nas/TV',
'force_group': 'nas',
},
'music': {
'path': '/storage/nas/Musik',
'force_group': 'nas',

View file

@ -115,10 +115,10 @@ nodes['kunsi-p14s'] = {
'entries': {
'arch': {
'title': 'Arch Linux',
'linux': '/vmlinuz-linux',
'linux': '/vmlinuz-linux-lts',
'initrd': [
'/amd-ucode.img',
'/initramfs-linux.img',
'/initramfs-linux-lts.img',
],
'options': {
'net.ifnames=0',
@ -128,9 +128,9 @@ nodes['kunsi-p14s'] = {
},
'arch-fallback': {
'title': 'Arch Linux (no ucode, fallback initramfs)',
'linux': '/vmlinuz-linux',
'linux': '/vmlinuz-linux-lts',
'initrd': [
'/initramfs-linux-fallback.img',
'/initramfs-linux-lts-fallback.img',
],
'options': {
'net.ifnames=0',