Trying to use nix to declaratively configure all aspects of termux and found out that ~/.termux/termux.properties can't be a symlink. There's an issue for it upstream, but they claim it'd be security issue to allow that file to be a symlink (termux/termux-app#4157).
I guess assuming that file can't be a symlink the next based thing would be using an activation script to deploy it?
Edit: I wrote an activation script. (termux.properties can be at either .termux/termux.properties on .config/termux/termux.properties)
build.activation.generateTermuxProperties = let
path = "$HOME/.config/termux/termux.properties";
settings = {
fullscreen = true;
use-fullscreen-workaround = true;
};
in /* bash */ ''
echo "generating termux.properties"
$DRY_RUN_CMD mkdir -p $(dirname ${path})
$DRY_RUN_CMD printf "# Generated by nix-on-droid. Warning: changes will be overwritten #\n" > "${path}"
$DRY_RUN_CMD printf "${lib.generators.toKeyValue {} settings}" >> "${path}"
'';
Trying to use nix to declaratively configure all aspects of termux and found out that
~/.termux/termux.propertiescan't be a symlink. There's an issue for it upstream, but they claim it'd be security issue to allow that file to be a symlink (termux/termux-app#4157).I guess assuming that file can't be a symlink the next based thing would be using an activation script to deploy it?
Edit: I wrote an activation script. (termux.properties can be at either
.termux/termux.propertieson.config/termux/termux.properties)