Pare down zsh and refactor home manager a bit
This commit is contained in:
parent
ad63481835
commit
aa1213bb65
13 changed files with 36 additions and 121 deletions
84
home-manager/shared/shell/helix.nix
Normal file
84
home-manager/shared/shell/helix.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
theme = "catppuccin_macchiato";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
lsp.display-messages = true;
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
cursorline = true;
|
||||
bufferline = "always";
|
||||
color-modes = true;
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
max-wrap = 25;
|
||||
wrap-indicator = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "python";
|
||||
language-id = "python";
|
||||
auto-format = true;
|
||||
file-types = ["py"];
|
||||
language-servers = ["ruff"];
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
language-id = "typst";
|
||||
auto-format = false;
|
||||
file-types = ["typ"];
|
||||
language-servers = ["typst-lsp"];
|
||||
}
|
||||
{
|
||||
name = "rust";
|
||||
language-id = "rust";
|
||||
auto-format = true;
|
||||
file-types = ["rs"];
|
||||
roots = ["Cargo.lock"];
|
||||
language-servers = ["rust-analyzer"];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
language-id = "nix";
|
||||
auto-format = true;
|
||||
file-types = ["nix"];
|
||||
roots = ["flake.lock" "flake.nix"];
|
||||
language-servers = ["nil"];
|
||||
formatter = {
|
||||
command = "alejandra";
|
||||
args = ["-q"];
|
||||
};
|
||||
}
|
||||
];
|
||||
language-server = {
|
||||
ruff = {
|
||||
command = "ruff-lsp";
|
||||
};
|
||||
typst-lsp = {
|
||||
command = "typst-lsp";
|
||||
};
|
||||
rust-analyzer = {
|
||||
command = "rust-analyzer";
|
||||
};
|
||||
nil = {
|
||||
command = "nil";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
home-manager/shared/shell/zellij.kdl
Normal file
31
home-manager/shared/shell/zellij.kdl
Normal file
|
@ -0,0 +1,31 @@
|
|||
session_serialization true
|
||||
theme "catppuccin-macchiato"
|
||||
|
||||
themes {
|
||||
catppuccin-mocha {
|
||||
bg "#585b70" // Surface2
|
||||
fg "#cdd6f4"
|
||||
red "#f38ba8"
|
||||
green "#a6e3a1"
|
||||
blue "#89b4fa"
|
||||
yellow "#f9e2af"
|
||||
magenta "#f5c2e7" // Pink
|
||||
orange "#fab387" // Peach
|
||||
cyan "#89dceb" // Sky
|
||||
black "#181825" // Mantle
|
||||
white "#cdd6f4"
|
||||
}
|
||||
catppuccin-macchiato {
|
||||
bg "#5b6078" // Surface2
|
||||
fg "#cad3f5"
|
||||
red "#ed8796"
|
||||
green "#a6da95"
|
||||
blue "#8aadf4"
|
||||
yellow "#eed49f"
|
||||
magenta "#f5bde6" // Pink
|
||||
orange "#f5a97f" // Peach
|
||||
cyan "#91d7e3" // Sky
|
||||
black "#1e2030" // Mantle
|
||||
white "#cad3f5"
|
||||
}
|
||||
}
|
15
home-manager/shared/shell/zellij.nix
Normal file
15
home-manager/shared/shell/zellij.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{lib, ...}: {
|
||||
programs.zellij = {
|
||||
# This autostarts zellij on zsh start
|
||||
# TODO find specific settings for vscode to avoid
|
||||
#enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
"zellij" = {
|
||||
source = ./zellij.kdl;
|
||||
target = ".config/zellij/config.kdl";
|
||||
};
|
||||
};
|
||||
}
|
57
home-manager/shared/shell/zsh.nix
Normal file
57
home-manager/shared/shell/zsh.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable starship
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
code = "codium ./";
|
||||
lh = "ls -lah";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "sha256-Z6EYQdasvpl1P78poj9efnnLj7QQg13Me8x1Ryyw+dM=";
|
||||
};
|
||||
}
|
||||
];
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
historySubstringSearch.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
#zsh-abbr.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"fancy-ctrl-z"
|
||||
"git-flow"
|
||||
"isodate"
|
||||
"z"
|
||||
];
|
||||
theme = "catppuccin-macchiato";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue