Skip to content

Instantly share code, notes, and snippets.

View sbogomolov's full-sized avatar

Sergii Bogomolov sbogomolov

View GitHub Profile
@sbogomolov
sbogomolov / Debian, encrypted ZFS root, ZED, Podman.md
Last active December 2, 2025 02:34
Install Debian with encrypted ZFS root, ZFSBootMenu with remote unlock via SSH, ZED notifications, Podman

Install

  • Follow the official ZFSBootMenu guide until the last section Prepare for first boot.

    • My zroot is a mirror, so I have also created a mirror for my EFI boot partitions. Important point here is to use metadata version 1.0 to store all md-related stuff at the end of partition. Each partition in the mirror can be used as regular FAT32 EFI boot partition.
      mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 --metadata=1.0 --homehost=<future_host_name> --name=efi /dev/nvme0n1p1 /dev/nvme1n1p1
      
  • Then create FAT32 filesystem on /dev/md1 and mount it to /boot/efi (via /etc/fstab).
@sbogomolov
sbogomolov / authentik-overseerr-auth
Last active October 31, 2025 15:20
Property Mapping for authentik: Overseerr authentication using Plex SSO token
import json
import requests
from authentik.sources.plex.models import UserPlexSourceConnection
connection = UserPlexSourceConnection.objects.filter(user=request.user).first()
if not connection:
ak_logger.info("Overseer: No Plex connection found")
return {}
base_url = "http://overseerr:5055"
@sbogomolov
sbogomolov / authentik-tautulli-auth
Last active September 21, 2025 19:05
Property Mapping for authentik: Tautulli authentication using Plex SSO token or username and password
from authentik.sources.plex.models import UserPlexSourceConnection
base_url = "http://tautulli.apps:8181"
end_point = "/auth/signin"
headers = {
"Content-Type": "application/x-www-form-urlencoded",
}
def auth_with_plex():
@sbogomolov
sbogomolov / update-dns
Last active December 8, 2024 13:54
RouterOS scrpit to add static DNS records for DHCP leases
:local zone "local";
:local ttl "00:05:00"
:local hostname
:local ip
:local dnsip
:local dhcpip
:local dnsnode
:local dhcpnode
/ip dns static;
#
# Runs ssh-agent if it is not already running.
#
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")