Added alejandra input (for now) Reformatted all NIX files On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: flake.lock modified: flake.nix modified: hosts/default/default.nix modified: hosts/default/hardware.nix modified: hosts/nixstation/default.nix modified: hosts/nixstation/hardware.nix modified: hosts/nixstation/host-packages.nix modified: hosts/zaneyos-24-vm/default.nix modified: hosts/zaneyos-24-vm/hardware.nix modified: hosts/zaneyos-oem/default.nix modified: hosts/zaneyos-oem/hardware.nix modified: modules/core/boot.nix modified: modules/core/cachix.nix modified: modules/core/default.nix modified: modules/core/flatpak.nix modified: modules/core/fonts.nix modified: modules/core/greetd.nix modified: modules/core/hardware.nix modified: modules/core/network.nix modified: modules/core/nfs.nix modified: modules/core/nh.nix modified: modules/core/overlays.nix modified: modules/core/printing.nix modified: modules/core/quickshell.nix modified: modules/core/sddm.nix modified: modules/core/services.nix modified: modules/core/starfish.nix modified: modules/core/steam.nix modified: modules/core/stylix.nix modified: modules/core/syncthing.nix modified: modules/core/thunar.nix modified: modules/core/user.nix modified: modules/core/virtualisation.nix modified: modules/core/xserver.nix modified: modules/drivers/amd-drivers.nix modified: modules/drivers/default.nix modified: modules/drivers/intel-drivers.nix modified: modules/drivers/local-hardware-clock.nix modified: modules/drivers/nvidia-amd-hybrid.nix modified: modules/drivers/nvidia-drivers.nix modified: modules/drivers/nvidia-prime-drivers.nix modified: modules/drivers/vm-guest-services.nix modified: modules/home/bash.nix modified: modules/home/bashrc-personal.nix modified: modules/home/cli/bat.nix modified: modules/home/cli/bottom.nix modified: modules/home/cli/btop.nix modified: modules/home/cli/cava.nix modified: modules/home/cli/fzf.nix modified: modules/home/cli/gh.nix modified: modules/home/cli/git.nix modified: modules/home/cli/htop.nix modified: modules/home/cli/lazygit.nix modified: modules/home/editors/antigravity.nix modified: modules/home/editors/doom-emacs-install.nix modified: modules/home/editors/doom-emacs.nix modified: modules/home/editors/evil-helix.nix modified: modules/home/editors/nvf.nix modified: modules/home/emoji.nix modified: modules/home/gtk.nix modified: modules/home/hyprland/animations-def.nix modified: modules/home/hyprland/animations-dynamic.nix modified: modules/home/hyprland/animations-end4.nix modified: modules/home/hyprland/animations-moving.nix modified: modules/home/hyprland/default.nix modified: modules/home/hyprland/env.nix modified: modules/home/hyprland/hypridle.nix modified: modules/home/hyprland/hyprland.nix modified: modules/home/hyprland/hyprlock.nix modified: modules/home/hyprland/pyprland.nix modified: modules/home/noctalia.nix modified: modules/home/obs-studio.nix modified: modules/home/overview.nix modified: modules/home/qt.nix modified: modules/home/rofi/config-long.nix modified: modules/home/rofi/default.nix modified: modules/home/rofi/rofi.nix modified: modules/home/scripts/default.nix modified: modules/home/scripts/emopicker9000.nix modified: modules/home/scripts/gemini-cli.nix modified: modules/home/scripts/hm-find.nix modified: modules/home/scripts/keybinds.nix modified: modules/home/scripts/note-from-clipboard.nix modified: modules/home/scripts/note.nix modified: modules/home/scripts/nvidia-offload.nix modified: modules/home/scripts/rofi-launcher.nix modified: modules/home/scripts/screenshootin.nix modified: modules/home/scripts/squirtle.nix modified: modules/home/scripts/task-waybar.nix modified: modules/home/scripts/wallsetter.nix modified: modules/home/scripts/web-search.nix modified: modules/home/scripts/zcli.nix modified: modules/home/starship-ddubs-1.nix modified: modules/home/starship.nix modified: modules/home/swappy.nix modified: modules/home/swaync.nix modified: modules/home/tealdeer.nix modified: modules/home/terminals/ghostty.nix modified: modules/home/terminals/kitty.nix modified: modules/home/terminals/wezterm.nix modified: modules/home/virtmanager.nix modified: modules/home/waybar/waybar-curved.nix modified: modules/home/waybar/waybar-ddubs-2.nix modified: modules/home/waybar/waybar-ddubs.nix modified: modules/home/waybar/waybar-dwm-2.nix modified: modules/home/waybar/waybar-jerry.nix modified: modules/home/waybar/waybar-nekodyke.nix modified: modules/home/waybar/waybar-simple.nix modified: modules/home/wlogout/default.nix modified: modules/home/xdg.nix modified: modules/home/yazi/default.nix modified: modules/home/yazi/keymap.nix modified: modules/home/yazi/theme.nix modified: modules/home/yazi/yazi.nix modified: modules/home/zoxide.nix modified: modules/home/zsh/default.nix modified: modules/home/zsh/zshrc-personal.nix modified: profiles/amd-hybrid/default.nix modified: profiles/amd/default.nix modified: profiles/intel/default.nix modified: profiles/nvidia-laptop/default.nix modified: profiles/nvidia/default.nix modified: profiles/vm/default.nix
37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
gemini-launcher = pkgs.writeShellScriptBin "gemini-launcher" ''
|
|
#!${pkgs.bash}/bin/bash
|
|
|
|
# Define the path to your API key file
|
|
KEY_FILE="${config.home.homeDirectory}/gem.key"
|
|
|
|
# Check if the key file exists and is readable
|
|
if [ -f "$KEY_FILE" ]; then
|
|
# Source the API key from the file.
|
|
source "$KEY_FILE"
|
|
# Launch Gemini directly; it will pick up the exported key.
|
|
exec ${pkgs.kitty}/bin/kitty -e ${pkgs.gemini-cli}/bin/gemini
|
|
else
|
|
# If the key file doesn't exist, launch kitty with an informational message, then start gemini.
|
|
exec ${pkgs.kitty}/bin/kitty -e bash -c "echo 'NOTE: Gemini API key file not found at ~/.gem.key.'; echo 'To use a key, create this file with content: export GEMINI_API_KEY=\"YOUR_KEY\"'; echo; echo 'Starting Gemini CLI, which will fall back to web-based login...'; echo; exec ${pkgs.gemini-cli}/bin/gemini"
|
|
fi
|
|
'';
|
|
in {
|
|
home.packages = [
|
|
gemini-launcher
|
|
];
|
|
|
|
xdg.desktopEntries.gemini-cli = {
|
|
name = "Gemini CLI";
|
|
comment = "Launch the Gemini CLI in Kitty terminal";
|
|
icon = "utilities-terminal";
|
|
exec = "gemini-launcher";
|
|
terminal = false;
|
|
type = "Application";
|
|
categories = ["Development" "Utility"];
|
|
};
|
|
}
|