adding app_image_path configuration #35

Merged
Richie merged 3 commits from feature/adding-app_image_path-configuration into main 2026-07-27 23:18:11 -04:00
7 changed files with 69 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
OLLAMA_API_BASE_URL = "https://ollama.com";
WEBUI_AUTH = "False";
};
};
+5
View File
@@ -0,0 +1,5 @@
{
home.sessionPath = [
"/home/richie/app_images/"
];
}
+1
View File
@@ -7,6 +7,7 @@
./firefox
./kitty.nix
./llm_tools.nix
./t3_code
./vscode
];
+36
View File
@@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
...
}:
let
t3-code = pkgs.writeShellApplication {
name = "t3-code";
runtimeInputs = with pkgs; [
coreutils
kdePackages.kdialog
];
text = builtins.readFile ./launch.sh;
};
in
{
home = {
# AppImages are runnable from a shell as well
sessionPath = [ "${config.home.homeDirectory}/app_images" ];
packages = [ t3-code ];
};
# KDE builds its menu from desktop entries, not from PATH
xdg.desktopEntries.t3-code = {
name = "T3 Code";
genericName = "Code Editor";
comment = "Newest T3 Code AppImage in ~/app_images";
exec = "${lib.getExe t3-code} %U";
icon = "${./icon.png}";
terminal = false;
categories = [ "Development" ];
startupNotify = true;
settings.StartupWMClass = "t3code";
};
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

+25
View File
@@ -0,0 +1,25 @@
# Launch the newest T3 Code AppImage in the app image directory.
#
# The nightly builds carry the version in the file name, so the file to run is
# resolved at launch time rather than baked into the desktop entry.
# No shebang: this is wrapped by writeShellApplication, which supplies one.
dir="${T3_CODE_DIR:-$HOME/app_images}"
shopt -s nullglob
images=("$dir"/T3-Code-*.AppImage)
if [ "${#images[@]}" -eq 0 ]; then
msg="No T3 Code AppImage found in $dir"
echo "$msg" >&2
# launched from KDE there is no terminal to read, so say it on screen too
kdialog --error "$msg" || true
exit 1
fi
img="$(printf '%s\n' "${images[@]}" | sort -V | tail -n1)"
[ -x "$img" ] || chmod +x "$img"
# --no-sandbox matches the AppImage's own desktop entry; binfmt hands the
# AppImage off to appimage-run.
exec "$img" --no-sandbox "$@"
@@ -1,5 +1,6 @@
{
imports = [
../home/app_image_path.nix
../home/global.nix
../home/gui
];