From bcd4fa9839dbfe6f7e6ddcb270a276a741d5b73f Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sat, 25 Apr 2026 14:57:29 +0200 Subject: [PATCH] fix bug with caelestia conf being read-only Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- home/system/caelestia-shell/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/home/system/caelestia-shell/default.nix b/home/system/caelestia-shell/default.nix index 9fbb9ae..bb97cd6 100644 --- a/home/system/caelestia-shell/default.nix +++ b/home/system/caelestia-shell/default.nix @@ -3,6 +3,7 @@ { pkgs, inputs, + lib, ... }: { imports = [ @@ -56,6 +57,16 @@ "caelestia scheme set -n custom" ]; + # shell.json is managed by home-manager (read-only symlink) but caelestia + # needs to write to it at runtime: replace the symlink with a mutable copy + home.activation.caelestiaWritableShellConfig = lib.hm.dag.entryAfter ["linkGeneration"] '' + if [ -L "$HOME/.config/caelestia/shell.json" ]; then + $DRY_RUN_CMD cp --remove-destination \ + "$(readlink -f "$HOME/.config/caelestia/shell.json")" \ + "$HOME/.config/caelestia/shell.json" + fi + ''; + services.cliphist = { enable = true; allowImages = true;