37 lines
800 B
Nix
37 lines
800 B
Nix
{
|
|
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";
|
|
};
|
|
}
|