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" key = "infobeamer"
if device: if device:
key += f"/{device['id']}" key += f"/{device['id']}"
if device["description"]:
message = f"[{device['description']}] {message}" message = f"[{device['description']}] {message}"
else:
message = f"[{device['serial']}] {message}"
client.publish( client.publish(
CONFIG["mqtt"]["topic"], CONFIG["mqtt"]["topic"],

View file

@ -32,21 +32,9 @@ Include = /etc/pacman.d/mirrorlist
Server = ${node.metadata.get('pacman/repository')} Server = ${node.metadata.get('pacman/repository')}
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
% endif % endif
% if node.metadata.get('pacman/enable_aurto', True): % if node.metadata.get('pacman/enable_aurto'):
[aurto] [aurto]
Server = https://aurto.kunbox.net/ Server = https://aurto.kunbox.net/
SigLevel = Optional TrustAll SigLevel = Optional TrustAll
% endif % 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 = { pkg_pacman = {
'acpi_call-lts': {},
'at': {}, 'at': {},
'autoconf': {}, 'autoconf': {},
'automake': {}, 'automake': {},
@ -61,6 +62,7 @@ pkg_pacman = {
'ldns': {}, 'ldns': {},
'less': {}, 'less': {},
'libtool': {}, 'libtool': {},
'linux-lts': {},
'logrotate': {}, 'logrotate': {},
'lsof': {}, 'lsof': {},
'm4': {}, 'm4': {},
@ -102,12 +104,6 @@ pkg_pacman = {
'zip': {}, '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(): for pkg, config in node.metadata.get('pacman/packages', {}).items():
pkg_pacman[pkg] = config pkg_pacman[pkg] = config

View file

@ -4,6 +4,7 @@ defaults = {
'glibc', 'glibc',
'pacman', 'pacman',
}, },
'enable_aurto': True,
'no_extract': { 'no_extract': {
'etc/cron.d/0hourly', 'etc/cron.d/0hourly',
# don't install systemd-homed pam module. It produces a lot of spam in # 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 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 = { files = {
'/etc/modprobe.d/zfs.conf': { '/etc/modprobe.d/zfs.conf': {
'source': 'zfs-modprobe.conf', 'source': 'zfs-modprobe.conf',

View file

@ -48,6 +48,12 @@ defaults = {
'etc/sudoers.d/zfs', 'etc/sudoers.d/zfs',
}, },
'packages': { 'packages': {
'zfs-linux-lts': {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
'zfs-utils': { 'zfs-utils': {
'needed_by': { 'needed_by': {
'svc_systemd:zfs-zed', '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( @metadata_reactor.provides(
'apt/packages', 'apt/packages',
) )

View file

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

View file

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