Files
2026-09-21 03:47:36 +05:00

34 lines
1.2 KiB
Nix

# config/obs-studio and is symlinked into place -- home-manager's
# programs.obs-studio module only wraps the package and its plugins, it has no
# options for profiles or scene collections.
#
# recursive = true matters: without it home-manager would symlink the whole
# ~/.config/obs-studio directory into the nix store, and OBS could not create
# logs/, plugin_config/ or basic/scenes/ inside a read-only store path. With it,
# the directories are real and only the tracked files are links.
#
# OBS rewrites its own config on exit (user.ini geometry/DockState,
# global.ini LastVersion, basic.ini whenever settings change). Those writes
# replace the symlink with a regular file, which is harmless -- the next
# nixos-rebuild switch moves it aside as *.hm-bak and relinks. The repo is the
# source of truth, so anything changed in the OBS GUI that should stick has to
# be copied back:
#
# cp -a ~/.config/obs-studio/user.ini config/obs-studio/user.ini
#
# Iteration loop: edit config/obs-studio/... -> git add if new ->
# nixos-rebuild switch -> restart OBS.
{ ... }:
{
programs.obs-studio = {
enable = true;
# plugins = with pkgs.obs-studio-plugins; [ ];
};
xdg.configFile."obs-studio" = {
source = ../config/obs-studio;
recursive = true;
};
}