{ config, pkgs, lib, ... }: let host_name = "litten"; host_fqdn = "${host_name}.brenise.dev"; unstable = import { config = config.nixpkgs.config; }; secrets = import ./secrets.nix; # https://nixos.wiki/wiki/Fish interactiveShellInit = '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" exec ${pkgs.fish}/bin/fish $LOGIN_OPTION fi ''; # Caddy+namecheap plugin builds fail on v2.10.0+ due to libdns changes: https://github.com/caddy-dns/namecheap/issues/14 # Pin caddy v2.9.1 and go 1.23 pinnedPkgs = fetchTarball { # This is the commit merged from the caddy: 2.9.1 PR 375655 url = "https://github.com/NixOS/nixpkgs/archive/4ae25041b2c187c0f696b6fc39c196677fb41112.tar.gz"; sha256 = "sha256:12009w2iph89i18bc646y2qhskv6gmq9fmchrcjrw1ibxadnkv4z"; }; caddy_pinned = import pinnedPkgs { config = config.nixpkgs.config; }; caddyWithPlugins = caddy_pinned.caddy.withPlugins { plugins = ["github.com/caddy-dns/namecheap@v0.0.0-20250228023406-ef9fadb67785"]; hash = "sha256-WDA/qSMwMqLWaohNSCtc/lWFdTJKeONapLconR87cUI="; # This will change every update }; litellmEnvContent = '' LITELLM_MASTER_KEY=${secrets.litellmApiKeys.LITELLM_MASTER_KEY} XAI_API_KEY=${secrets.litellmApiKeys.XAI_API_KEY} GROK_API_KEY=${secrets.litellmApiKeys.GROK_API_KEY} ANTHROPIC_API_KEY=${secrets.litellmApiKeys.ANTHROPIC_API_KEY} GOOGLE_API_KEY=${secrets.litellmApiKeys.GOOGLE_API_KEY} ''; litellmEnvFile = pkgs.writeText "litellm-env" litellmEnvContent; in { inherit host_name host_fqdn unstable secrets interactiveShellInit litellmEnvContent litellmEnvFile caddyWithPlugins; }