Add Nushell
This commit is contained in:
parent
942ec251b6
commit
b0d17ab917
3 changed files with 54 additions and 29 deletions
|
@ -15,6 +15,8 @@ this Flake.
|
|||
- **`treefmt`** (with Helix integration): Automatically formats this repository
|
||||
when modifying it, with features to check the flake for formatting
|
||||
consistency.
|
||||
- **Nushell**: Shell that uses structured data, with quality-of-life
|
||||
integrations enabled.
|
||||
- **Language Server Protocol (LSP)**: Has language servers for file formats used
|
||||
in this repository; integrates with Helix text editor and fully managed by Nix
|
||||
with each language's configuration in its own file.
|
||||
|
|
|
@ -1,17 +1,26 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
username = "sudoer777";
|
||||
localFastModel = "qwen2.5-coder-num_ctx";
|
||||
localReasoningModel = "deepseek-r1-num_ctx";
|
||||
remoteFastModel = "deepseek/deepseek-chat-v3-0324:free"; # "qwen/qwen-2.5-coder-32b-instruct:free";
|
||||
remoteReasoningModel = "deepseek/deepseek-r1-0528:free";
|
||||
in
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
openrouter_api_key = { };
|
||||
};
|
||||
defaultSopsFile = ./secrets/secrets.yaml;
|
||||
age.keyFile = /home/${username}/.config/sops/age/keys.txt;
|
||||
};
|
||||
nixGL = {
|
||||
packages = import inputs.nixgl {
|
||||
inherit pkgs;
|
||||
|
@ -24,7 +33,7 @@ in
|
|||
};
|
||||
home = {
|
||||
stateVersion = "24.11";
|
||||
username = "sudoer777";
|
||||
username = username;
|
||||
homeDirectory = "/home/sudoer777";
|
||||
language.base = "eo.utf8";
|
||||
packages = [
|
||||
|
@ -84,7 +93,11 @@ in
|
|||
pkgs.xz
|
||||
];
|
||||
file = { };
|
||||
sessionVariables = { };
|
||||
shell = {
|
||||
enableNushellIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
home-manager = {
|
||||
|
@ -157,32 +170,41 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
# TODO: Disable Guix integration
|
||||
# nushell = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# completions = {
|
||||
# algorithm = "fuzzy";
|
||||
# external.enable = true;
|
||||
# };
|
||||
# };
|
||||
# shellAliases = {
|
||||
# aichat_reasoning_remote = "aichat --model openrouter:${remoteReasoningModel}";
|
||||
# aichat_reasoning_local = "aichat --model ollama:${localReasoningModel}";
|
||||
# aichat_fast_remote = "aichat --model openrouter:${remoteFastModel}";
|
||||
# aichat_fast_local = "aichat --model ollama:${localFastModel}";
|
||||
# codex_remote = "codex --provider openrouter --model ${remoteFastModel}";
|
||||
# codex_local = "codex --provider ollama --model ${localFastModel}";
|
||||
# };
|
||||
# };
|
||||
# TODO: Disable Guix integration
|
||||
# starship = {
|
||||
# enable = true;
|
||||
# };
|
||||
# carapace = {
|
||||
# enable = true;
|
||||
# };
|
||||
# TODO: Disable Guix integration
|
||||
nushell = {
|
||||
enable = true;
|
||||
environmentVariables = {
|
||||
OPENROUTER_API_KEY = lib.hm.nushell.mkNushellInline "cat ${config.sops.secrets.openrouter_api_key.path}";
|
||||
};
|
||||
settings = {
|
||||
completions = {
|
||||
algorithm = "fuzzy";
|
||||
case_sensitive = false;
|
||||
external = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# set -x ZATHURA_PLUGINS_PATH $GUIX_HOME/lib/zathura
|
||||
shellAliases = {
|
||||
aichat_reasoning_remote = "${pkgs.aichat}/bin/aichat --model openrouter:${remoteReasoningModel}";
|
||||
aichat_reasoning_local = "${pkgs.aichat}/bin/aichat --model ollama:${localReasoningModel}";
|
||||
aichat_fast_remote = "${pkgs.aichat}/bin/aichat --model openrouter:${remoteFastModel}";
|
||||
aichat_fast_local = "${pkgs.aichat}/bin/aichat --model ollama:${localFastModel}";
|
||||
codex_remote = "${pkgs.codex}/bin/codex --provider openrouter --model ${remoteFastModel}";
|
||||
codex_local = "${pkgs.codex}/bin/codex --provider ollama --model ${localFastModel}";
|
||||
hotspot = "sudo sysctl net.ipv4.ip_default_ttl=65";
|
||||
};
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
};
|
||||
carapace = {
|
||||
enable = true;
|
||||
enableFishIntegration = false;
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
};
|
||||
kitty = {
|
||||
enable = true;
|
||||
package = (config.lib.nixGL.wrap pkgs.kitty);
|
||||
|
|
|
@ -5,6 +5,7 @@ let
|
|||
"LLMs"
|
||||
"LTeX"
|
||||
"NixOS"
|
||||
"Nushell"
|
||||
];
|
||||
tomlFormatter = pkgs.formats.toml { };
|
||||
vale = {
|
||||
|
|
Loading…
Add table
Reference in a new issue