From 1841f9394cc53eb6f43a3c7d037c92c9949758a9 Mon Sep 17 00:00:00 2001 From: oqyude Date: Fri, 7 Aug 2026 03:37:43 +0300 Subject: [PATCH] termux: create channels/nixpkgs under real symlink target (dangling symlink blocks mkdir -p) --- modules/termux/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/termux/default.nix b/modules/termux/default.nix index 6cbd77b..f9da46e 100644 --- a/modules/termux/default.nix +++ b/modules/termux/default.nix @@ -53,11 +53,12 @@ in # unconditionally; nix warns about the missing dir on every invocation. # Making it exist silences the warning. Must be done in activation (not # home-manager): ~/.nix-defexpr/channels is a symlink into - # ~/.local/state/nix/profiles/channels, which home-manager cannot link - # into. + # ~/.local/state/nix/profiles/channels (dangling until it exists), which + # home-manager cannot link into. mkdir -p refuses to traverse a dangling + # symlink, so create the real target dir instead. build.activation.nixdefexpr = '' - $DRY_RUN_CMD mkdir -p "${config.user.home}/.nix-defexpr/channels/nixpkgs" - $DRY_RUN_CMD touch "${config.user.home}/.nix-defexpr/channels/nixpkgs/.keep" + $DRY_RUN_CMD mkdir -p "${config.user.home}/.local/state/nix/profiles/channels/nixpkgs" + $DRY_RUN_CMD touch "${config.user.home}/.local/state/nix/profiles/channels/nixpkgs/.keep" ''; # runit service tree: ~/service//{run,log/run}. run/ and log/run are