moved dendrite around
This commit is contained in:
parent
a561b70525
commit
ebaa810d83
4 changed files with 27 additions and 1 deletions
|
@ -11,6 +11,7 @@ with lib;
|
||||||
imports = [
|
imports = [
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./heygpt.nix
|
||||||
./hoard.nix
|
./hoard.nix
|
||||||
./oh-my-posh
|
./oh-my-posh
|
||||||
./remote-install.nix
|
./remote-install.nix
|
||||||
|
|
25
nixos/components/terminal/heygpt.nix
Normal file
25
nixos/components/terminal/heygpt.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.components.terminal.heygpt.enable = mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = config.components.terminal.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (config.components.terminal.heygpt.enable) {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writers.writeBashBin "heygpt" ''
|
||||||
|
export OPENAI_API_BASE="https://api.openai.com/v1"
|
||||||
|
export OPENAI_API_KEY=$(pass openai/apikey)
|
||||||
|
${lib.getExe pkgs.unstable.heygpt} "$@"
|
||||||
|
'')
|
||||||
|
(pkgs.writers.writeBashBin "heygpt-models" ''
|
||||||
|
export OPENAI_API_KEY=$(pass openai/apikey)
|
||||||
|
${getExe pkgs.curl} https://api.openai.com/v1/models \
|
||||||
|
-H "Authorization: Bearer $OPENAI_API_KEY" \
|
||||||
|
| ${getExe pkgs.jq} --raw-output '.data[] | .id' \
|
||||||
|
| ${getExe pkgs.gum} filter
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -50,7 +50,7 @@
|
||||||
#./property.nix # flask sucks, find something else
|
#./property.nix # flask sucks, find something else
|
||||||
|
|
||||||
# matrix
|
# matrix
|
||||||
./dendrite.nix
|
./terranix-dendrite.nix
|
||||||
|
|
||||||
# logging
|
# logging
|
||||||
./loki.nix
|
./loki.nix
|
||||||
|
|
Loading…
Reference in a new issue