initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,26 @@
|
||||
bindkey "^[OA" up-line-or-beginning-search
|
||||
bindkey "^[OB" down-line-or-beginning-search
|
||||
|
||||
function mkenv() {
|
||||
local template="$HOME/nixos-dotfiles/templates/shell-''${1}.nix"
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: mkenv <python|go|ts|csharp>"
|
||||
return 1
|
||||
fi
|
||||
if [[ ! -f "$template" ]]; then
|
||||
echo "No template for '$1'. Available: python, go, ts, csharp"
|
||||
return 1
|
||||
fi
|
||||
if [[ -f shell.nix ]]; then
|
||||
echo "shell.nix already exists"
|
||||
return 1
|
||||
fi
|
||||
cp "$template" shell.nix
|
||||
echo "use nix" > .envrc
|
||||
direnv allow
|
||||
echo "Created shell.nix and .envrc for $1"
|
||||
}
|
||||
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
command yazi "$@" --cwd-file="$tmp"
|
||||
@@ -61,9 +81,15 @@
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
format = "$directory$git_branch$git_status$line_break$character";
|
||||
format = "$hostname$directory$git_branch$git_status$direnv$line_break$character";
|
||||
right_format = "$time";
|
||||
|
||||
hostname = {
|
||||
ssh_only = true;
|
||||
format = "[$hostname]($style) ";
|
||||
style = "bold green";
|
||||
};
|
||||
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = false;
|
||||
@@ -94,6 +120,18 @@
|
||||
time_format = "%H:%M:%S";
|
||||
};
|
||||
|
||||
direnv = {
|
||||
disabled = false;
|
||||
format = "[$symbol$loaded/$allowed]($style) ";
|
||||
symbol = "direnv ";
|
||||
style = "bold yellow";
|
||||
allowed_msg = "on";
|
||||
not_allowed_msg = "off";
|
||||
denied_msg = "denied";
|
||||
loaded_msg = "loaded";
|
||||
unloaded_msg = "not loaded";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](bold green)";
|
||||
error_symbol = "[❯](bold red)";
|
||||
@@ -124,6 +162,12 @@
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
_ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%";
|
||||
};
|
||||
@@ -186,7 +230,7 @@
|
||||
xdg.configFile."fuzzel/fuzzel.ini".source = ./config/fuzzel/fuzzel.ini;
|
||||
xdg.configFile."qtile".source = ./config/qtile;
|
||||
xdg.configFile."nvim" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/home/ulve/nixos-dotfiles/config/dottily";
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/home/ulve/nixos-dotfiles/config/nvim";
|
||||
};
|
||||
xdg.configFile."sway".source = ./config/sway;
|
||||
xdg.configFile."waybar".source = ./config/waybar;
|
||||
@@ -252,34 +296,20 @@
|
||||
neovim # editor
|
||||
|
||||
# compilers / runtimes
|
||||
gcc # c compiler (also needed by treesitter)
|
||||
nodejs # javascript runtime
|
||||
go # go toolchain (needed by gopls + revive)
|
||||
dotnet-sdk # .net sdk (c#)
|
||||
gcc # c compiler (needed by treesitter)
|
||||
|
||||
# nvim: lsp servers
|
||||
tree-sitter # parser generator (nvim)
|
||||
nil # language server for nix
|
||||
lua-language-server # lsp: lua
|
||||
pyright # lsp: python
|
||||
bash-language-server # lsp: bash
|
||||
vtsls # lsp: typescript/javascript
|
||||
gopls # lsp: go
|
||||
omnisharp-roslyn # lsp: c#
|
||||
efm-langserver # lsp: general purpose (runs linters/formatters)
|
||||
|
||||
# nvim: formatters and linters
|
||||
nixpkgs-fmt # formatter: nix
|
||||
stylua # formatter: lua
|
||||
black # formatter: python
|
||||
prettierd # formatter: js/ts/html/css/json (daemon)
|
||||
fixjson # formatter: json
|
||||
gofumpt # formatter: go (stricter gofmt)
|
||||
shfmt # formatter: bash/sh
|
||||
lua54Packages.luacheck # linter: lua
|
||||
python3Packages.flake8 # linter: python
|
||||
eslint_d # linter: js/ts (daemon)
|
||||
shellcheck # linter: bash/sh
|
||||
revive # linter: go
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user