add samba share for music on nas

This commit is contained in:
Franzi 2024-08-23 19:43:04 +02:00
parent e8983829ed
commit 82aeeb585d
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 139 additions and 0 deletions

26
bundles/samba/metadata.py Normal file
View file

@ -0,0 +1,26 @@
from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
'samba': {},
'samba-vfs-modules': {},
}
}
}
@metadata_reactor.provides(
'firewall/port_rules',
)
def firewall(metadata):
return {
'firewall': {
'port_rules': {
'137/udp': atomic(metadata.get('samba/restrict-to', set())),
'138/udp': atomic(metadata.get('samba/restrict-to', set())),
'139/tcp': atomic(metadata.get('samba/restrict-to', set())),
'445/tcp': atomic(metadata.get('samba/restrict-to', set())),
},
},
}