Compare commits

..

No commits in common. "main" and "unbound-sophie" have entirely different histories.

8 changed files with 45 additions and 25 deletions

View file

@ -40,10 +40,7 @@ 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,9 +32,21 @@ 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'): % if node.metadata.get('pacman/enable_aurto', True):
[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,7 +33,6 @@ svc_systemd['paccache.timer'] = {
} }
pkg_pacman = { pkg_pacman = {
'acpi_call-lts': {},
'at': {}, 'at': {},
'autoconf': {}, 'autoconf': {},
'automake': {}, 'automake': {},
@ -62,7 +61,6 @@ pkg_pacman = {
'ldns': {}, 'ldns': {},
'less': {}, 'less': {},
'libtool': {}, 'libtool': {},
'linux-lts': {},
'logrotate': {}, 'logrotate': {},
'lsof': {}, 'lsof': {},
'm4': {}, 'm4': {},
@ -104,6 +102,12 @@ 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,7 +4,6 @@ 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,9 +2,6 @@ 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,12 +48,6 @@ 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',
@ -127,6 +121,27 @@ 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,10 +177,6 @@ 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-lts', 'linux': '/vmlinuz-linux',
'initrd': [ 'initrd': [
'/amd-ucode.img', '/amd-ucode.img',
'/initramfs-linux-lts.img', '/initramfs-linux.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-lts', 'linux': '/vmlinuz-linux',
'initrd': [ 'initrd': [
'/initramfs-linux-lts-fallback.img', '/initramfs-linux-fallback.img',
], ],
'options': { 'options': {
'net.ifnames=0', 'net.ifnames=0',