Skip to content

FreeBSD

Drew Daniels edited this page Aug 27, 2025 · 19 revisions

TODO

  • Figure out how to install 1Password Desktop on FreeBSD - or migrate to using KeepassXC desktop and it's browser extension
  • Figure out how to install blink.cmp binary
  • Create node issue in mise
  • Create openjdk issue in mise
  • Create chezmoi issue related to .chezmoi.os and .chezmoi.osRelease variables not working with FreeBSD
  • Fix whatever the issue is with vim-gutentags

Xterm notes

  • To scroll in console history, press Fn+s to enter Scroll Lock mode and then use the up and down arrow keys to scroll through history.
  • To exit scroll lock, press Fn+s again

Copy/Paste Notes

  • To copy, select text with mouse and press middle button on touchpad
  • To paste, Shift+Insert

Initial configuration

Install sudo package

$ su

# pkg install sudo

Enable wheel users to execute any command as root:

# vi /usr/local/etc/sudoers

Uncomment this line:

# %wheel ALL=(ALL:ALL) ALL

Exit root shell:

exit

Make user owner of /home/<user> folder if not already:

sudo chown -R drew /home/drew

Software Installation

Fonts

sudo pkg install jetbrains-mono
fc-cache # just in case manual refresh necessary

Editor

Install vim and wl-clipboard for initial edits

sudo pkg install vim

Setting up Desktop Environment

Install Intel graphics modules

sudo pkg install drm-kmod

Add the module to /etc/rc.conf:

sudo sysrc kld_list+=i915kms

Install X.org server:

sudo pkg install xorg

Install wayland and seatd:

sudo pkg install wayland seatd

NOTE: May need to update XDG_RUNTIME_DIR to below

# Previously: XDG_RUNTIME_DIR=/var/run/xdg/drew
export XDG_RUNTIME_DIR=/var/run/user/$(id -u)

Start the seatd daemon now, and enable to run on startup.

sudo sysrc seatd_enable="YES"
sudo sysrc dbus_enable="YES"
sudo service seatd start

Install sway and other dependencies:

NOTE: Is dmenu necessary?

pkg install sway waybar pavucontrol swayrbar swayidle swayr sway-audio-idle-inhibit swaylock-effects alacritty wmenu

Add my user to the video group

pw groupmod video -m drew

Create sway configuration:

mkdir ~/.config/sway
cp /usr/local/etc/sway/config ~/.config/sway

Install browser:

sudo pkg install firefox

rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install nightly:

rustup toolchain install nightly

Set it as the default toolchain:

rustup default nightly

cargo-binstall

cargo install --locked cargo-binstall

cargo-update

cargo install --locked cargo-update

tree-sitter-cli:

cargo binstall tree-sitter-cli

mergiraf

cargo install --locked mergiraf

mise

cargo binstall mise

ruby dependencies

Install core dependencies for building ruby:

pkg install devel/autoconf devel/bison devel/patch lang/gcc databases/gdbm devel/gmake devel/libffi textproc/libyaml devel/ncurses security/openssl devel/readline

starship

curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /usr/bin

chezmoi

Installs chezmoi into /usr/local/bin, downloads dotfiles, and symlinks them to target directory ($HOME)

cd /usr/local || exit
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply Drew-Daniels

Install other core dependencies

pkg install \
  wget \
  jq \
  git \
  git-credential-oauth \
  neovim \
  wl-clipboard \
  ripgrep \
  git-delta \
  fish \
  fzf \
  fd-find \
  bat \
  bat-extras \
  ctags \
  tmux \
  automake \
  zoxide \
  yq \
  dust \
  rofi \
  librespeed-cli \
  feh \
  xmlstarlet \
  nmap \
  openvpn \
  wireguard-tools \
  plocate \
  foliate \
  neomutt \
  nvme-cli \
  obs-studio \
  direnv \
  gitleaks \
  weechat \
  hexyl \
  qutebrowser \
  gh \
  glab \
  ncmpcpp \
  libmpd \
  qt6ct \
  mpv \
  usbutils \
  strawberry \
  lsd \
  hs-pandoc \
  zathura-pdf-mupdf \
  mumble \
  qalculate-qt \
  isync \
  py311-urlscan \
  msmtp \
  abook \
  tree-sitter \
  llvm20 \
  cheese \
  ImageMagick7 \
  difftastic \
  libreoffice \
  yazi \
  jdtls \
  1password-client \
  keepassxc \
  jless \
  viu

NOTE: jdtls not available in FreeBSD Packages

non-mise-managed runtimes

node

Install runtime and compatible npm

sudo pkg install node22 npm-node22

Install global dependencies:

sudo npm i -g \
  pnpm \
  jgit \
  fsh-sushi \
  gofsh \
  oclif \
  tree-sitter-cli \
  yarn \
  nx \
  @nestjs/cli \
  json-sort-cli \
  vim-language-server \
  @olrtg/emmet-language-server \
  @microsoft/compose-language-service \
  live-server \
  eslint_d \
  @fsouza/prettierd \
  vscode-langservers-extracted \
  vue-language-server \
  tailwindcss-language-server \
  bash-language-server \
  dockerfile-language-server-nodejs \
  yaml-language-server \
  typescript-language-server
openjdk
sudo pkg install openjdk21
node
sudo pkg install node22 npm-node-22
deno
sudo pkg install deno

mise-managed runtimes

mise install

Extraneous Dependencies

py311-electrum:

Electrum Bitcoin wallet

sudo pkg install py311-electrum

Add user to operator group (for hardware wallet support)

pw groupmod operator -m drew

Edit configuration

vim /usr/local/etc/devd/hardware_wallet.conf

Restart devd to load the new rules

/etc/rc.d/devd restart
cheese

Start webcamd automatically at system startup:

sudo sysrc webcamd_enable=YES

Restart devd to start webcam:

sudo service devd restart

Add user to the webcamd group

sudo pw groupmod webcamd -m drew

Clone this wiki locally