Skip to content

feat(os/freebsd): add support - #1632

Draft
MFarabi619 wants to merge 18 commits into
HyDE-Project:devfrom
MFarabi619:mfarabi/feat/1329-add-freebsd-support
Draft

feat(os/freebsd): add support#1632
MFarabi619 wants to merge 18 commits into
HyDE-Project:devfrom
MFarabi619:mfarabi/feat/1329-add-freebsd-support

Conversation

@MFarabi619

@MFarabi619 MFarabi619 commented Mar 20, 2026

Copy link
Copy Markdown

Image

Description

Closes #1329.

⚠️🏗️ Work-in-progress, please do not thoroughly review yet.
Current setup is completely daily-drivable, however is not feature-complete to qualify the HyDE spec. Feel welcome to tack on commits.

I'm scanning the entire build system and flagging packages that don't exist in base tree or ports and may need to be built from source.

Progress:

  • [WIP] Hyprlock

  • Hyprcursor

  • Wallbash

  • Theme changes

  • hydevm via qemu and/or bhyve on GNU/Linux, FreeBSD, and also Darwin (macOS)

  • [IN PROGRESS] Screenshots with grim and slurp

  • Steam via Linux Binary Compatibiliy

  • Install Script

  • Graphics Drivers - Chapter 5.2. Graphics Drivers

  • [-] Login Managers

    • [NOT STARTED] SDDM
    • Ly
  • Hyprland

  • Waybar via dbus-launch

  • Rofi

    • Theming
    • Keybinds view
  • zsh

  • Kitty

    • Theming
  • fastfetch

  • Emacs - Chapter 2. Programming Tools

  • Neovim

  • Media

  • Emojis

  • Fonts - jetbrains-mono, nerd-fonts, noto-emoji

  • Firefox

  • HydeBSD Logo


Add official HyDE support for my super-duper ultra riced FreeBSD setup that I've been daily driving for the last few months and can attest to being stable enough to do my full-time software engineering and schooling work from. :)

Image Image Image
Image Image Image
image

Originally and affectionately named DoomBSD, as my goal with it is to provide a nice modular config experience similar to the following:

Doom Emacs LazyVim bsdconfig
image image image

My setup can be found here.
Relevant areas:

I've already gone through the FreeBSD Handbook and finished setting up all the goodies such as Linux Binary Compability, Virualization, Containerization, Webcam, Screenshots, Code editing, Media, Web Browsing, and a little bit of gaming.

OS Concept mappings

For those in GNU/Linux ecosystem unfamiliar with Hyprland, I hope this helps.

Arch Linux FreeBSD
Guided Installation archinstall bsdinstall
Bootloader GRUB/systemd-boot boot/loader.conf
Kernel Linux FreeBSD Kernel
Init System systemd via systemctl rc.d via sysctl
Base Filesystem btrfs ZFS
Alternate Filesystem ext4 UFS
Hypervisor KVM BSD Hypervisor - bhyve
Virtualization QEMU, VirtualBox, Docker, etc. QEMU, VirtualBox, bhyve, and Linux Binary Compatibility - /compat/linux , Docker via docker-machine & VirtualBox or DockerBox
Containerization LXC, systemd-nspawn, OCI Containers, Podman, etc. Thick Jails, Thin Jails, Service Jails, VNET Jails, Linux Jails, OCI Containers, Podman (experimental)
Userspace GNU + Arch Build System FreeBSD
Configuration Interface None bsdconfig
Package Manager (base) pacman pkg
Package Manager (extras) AUR helpers - yay/paru ports
Release Model Rolling Fixed with rolling ports tree
Documentation Arch Wiki FreeBSD Handbook, FreeBSD Porter's Handbook, FreeBSD Documentation Handbook, FreeBSD Wiki

Please note that the FreeBSD project contains the entire ecosystem of kernel + userspace + packages and more, whereas Arch Linux is mostly an outstanding build system with pacman adding sensible abstractions over lower level pkg primitives; therefore not all concepts are mappable nor a fair comparison. :)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Screenshots

Before After
image
image image image
image image

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fa7be6d9-92db-4224-8c33-a8036d482de1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MFarabi619 MFarabi619 changed the title chore(flake): note freebsd target triple for nix build output feat(os/freebsd): add support Mar 20, 2026
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from 6a2c193 to 1dabbf0 Compare March 21, 2026 16:32
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from 56220b5 to 9126adc Compare March 21, 2026 19:01
… to arch linux sections where similar

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from 9126adc to 2fde34e Compare March 21, 2026 19:05
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
…bash`

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>

This approach still works for GNU/Linux :)

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from f10f2c9 to 3142474 Compare March 21, 2026 22:18
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from 3142474 to 45e5a49 Compare March 21, 2026 23:07
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch 2 times, most recently from f70fc89 to f2b7066 Compare March 22, 2026 04:24
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619
MFarabi619 force-pushed the mfarabi/feat/1329-add-freebsd-support branch from f2b7066 to 7845d42 Compare March 22, 2026 04:26
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619

Copy link
Copy Markdown
Author

Still working on this :)

@kRHYME7

kRHYME7 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Woah!!!
Please send patches for some of the binaries like hyprquery,hyde-config and hydectl, in case you it needs to be compatible with bsd

@kRHYME7

kRHYME7 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

BTW The arch installer is too brittle and I don't want it to be technical debt anymore.

I think it is best to make a separate Installer handling different OS. Clone HyDE and Parse the Config/.

I am planning to ditch this installer too. So for this patch make it specific for ./Config files only

I have issues with sed too, I want something cleaner. I will add comments soon if you're fine with it.

Take note I don't have any machine so I can't test this too.

@kRHYME7 kRHYME7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all I can review for now. I ignored any changes in Scripts as I suggested in here

@kRHYME7 kRHYME7 Apr 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will handle this differently

I suggest doing this:

  1. Revert all sed changes

  2. Now as you might already notice, you know we can ship our own sed version
    ~/.local/lib/hyde/sed (or $LIB_DIR/hyde/sed) <- this is a script to handle any patch to any binary, you can handle the handover or the override here

# your custom sed
sed -i '' "${@}"
  1. Ship it with your installer of HyDE as I suggested here.

you can customize your own restore_cfg.psv and add stuff

O |  ${HOME}/.local/lib/hyde| sed  | pkg  

This will force users to haeve there sed wrapper that is accustomed for bsd. Put it below the other Core HyDE packages.

show_theme_status
if ! dconf write /org/gnome/desktop/interface/icon-theme "'$ICON_THEME'"; then
print_log -sec "theme" -warn "dconf" "failed to set icon theme"
if command -v dconf >/dev/null 2>&1 && { [[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ]] || [[ -n "${DISPLAY:-}" ]]; }; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this BSD related if not please send as separate patch please.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also for this one this might be a separate patch that targets non systemd. So this should be a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add this patches in advance so for the BSD specific patchs are easier to review.

@kRHYME7 kRHYME7 Apr 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are comfortable with python too please add a backend for pm.py in ./pm/. The python backend will be use for internal stuff and can have advance flags compared to pm.sh.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use uv now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks identical to the HyDE.

Image

But if you intend to have new requirements then this is fine as long as the pyproject-freebsd.toml is added as optional like how we add sed

O |  ${HOME}/.local/lib/hyde|  pyproject-freebsd.toml  | pkg  

BTW I use pkg as requirment package so it only triggers on BSD.

@kRHYME7

kRHYME7 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

[IN PROGRESS] Screenshots with grim and slurp

do you need help with this ?

I have this https://github.com/HyDE-Project/hydectl/ CLI in go and I think this binary will become a good backend command for screenshots with builtin Window manager support.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants