Working on terminal stuff

This commit is contained in:
2026-03-07 23:41:58 +01:00
parent 9533a9e235
commit 7c9f1318d4
4 changed files with 413 additions and 451 deletions
+368 -380
View File
File diff suppressed because it is too large Load Diff
@@ -1,18 +1,25 @@
{ config, pkgs, lib, user, inputs, flakeRoot, ... }: { config, pkgs, lib, user, ... }:
let
kittyConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/kitty";
in
{ {
# NixOS-level packages (optional, if you want Kitty installed system-wide)
environment.systemPackages = with pkgs; [ kitty ];
# Home Manager configuration for Kitty
home-manager.users.${user.username} = { home-manager.users.${user.username} = {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
settings = { settings = {
font_family = "FiraCode Nerd Font Mono"; font_family = "JetBrainsMono Nerd Font";
include = [ "${flakeRoot}/assets/kitty/themes/Catppuccin-Mocha.conf" ]; font_size = 12.0;
background_opacity = 0.60; cursor = "Beam";
dynamic_background_opacity = true; cursor_blink_interval = -1;
shell = "${pkgs.zsh}/bin/zsh";
}; };
}; };
# Catppuccin Mocha theme for Kitty
xdg.configFile."kitty/theme.conf".source = "${pkgs.catppuccin-kitty}/share/kitty/themes/Catppuccin-Mocha.conf";
xdg.configFile."kitty/kitty.conf".text = ''
include ${kittyConfigDir}/theme.conf
background_opacity 0.9
'';
}; };
} }
@@ -1,30 +1,27 @@
{ { config, pkgs, lib, user, ... }:
config,
pkgs,
lib,
user,
...
}:
{ {
home-manager.users.${user.username} = { home-manager.users.${user.username} = {
programs.starship = { programs.starship = {
enable = true; # Globally enables Starship for all shells enable = true;
settings = {
addNewline = false;
# Example: Catppuccin Mocha theme
format = "$all";
};
}; };
# Optional: Ensure Starship init is in shell configs (if not auto-added) # Catppuccin Mocha theme for Starship
xdg.configFile."bashrc".text = lib.concatStringsSep "\n" [ xdg.configFile."starship.toml".text = ''
"eval \"$(starship init bash)\"" format = "$all"
];
xdg.configFile."zshrc".text = lib.concatStringsSep "\n" [ [character]
"eval \"$(starship init zsh)\"" success_symbol = "[](bold green)"
]; error_symbol = "[](bold red)"
xdg.configFile."config/fish/config.fish".text = ''
starship init fish | source [directory]
style = "bold lavender"
[git_branch]
symbol = " "
style = "bold maroon"
[package]
disabled = true
''; '';
}; };
} }
@@ -1,50 +1,36 @@
{ { config, pkgs, lib, user, ... }:
config,
pkgs,
lib,
user,
...
}:
let let
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh"; zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
in in
{ {
home-manager.users.${user.username} = { home-manager.users.${user.username} = {
# Install and enable Zsh
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
dotDir = zshConfigDir; autosuggestions.enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
theme = "agnoster"; # Popular minimal theme theme = "agnoster";
plugins = [ plugins = [
"git" "git"
"sudo"
"docker"
"kubectl"
"zsh-autosuggestions" "zsh-autosuggestions"
"zsh-syntax-highlighting" "zsh-syntax-highlighting"
"docker"
"kubectl"
"history" "history"
"command-not-found" "command-not-found"
"extract" "extract"
"colored-man-pages"
]; ];
}; };
# Shell options (setopt)
shellAliases = { shellAliases = {
ls = "exa --icons -a --group-directories-first"; ls = "exa --icons -a --group-directories-first";
ll = "exa --icons -la --group-directories-first"; ll = "exa --icons -la --group-directories-first";
grep = "grep --color=auto";
}; };
}; };
# Consolidated .zshrc with best practices # Consolidated .zshrc
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
"# Enable Powerlevel10k (if installed)"
"${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
"# Oh-My-Zsh" "# Oh-My-Zsh"
"export ZSH=\"${zshConfigDir}\"" "export ZSH=\"${zshConfigDir}\""
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\"" "source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
@@ -54,36 +40,20 @@ in
"setopt AUTO_CD" "setopt AUTO_CD"
"setopt CORRECT" "setopt CORRECT"
"setopt INTERACTIVE_COMMENTS" "setopt INTERACTIVE_COMMENTS"
"setopt APPEND_HISTORY"
"setopt INC_APPEND_HISTORY"
"setopt HIST_IGNORE_ALL_DUPS"
"setopt HIST_REDUCE_BLANKS"
"setopt HIST_SAVE_NO_DUPS"
"setopt HIST_VERIFY"
"setopt SHARE_HISTORY"
"" ""
"# Starship prompt (if enabled)" "# Starship"
"eval \"$(starship init zsh)\"" "eval \"$(starship init zsh)\""
"" ""
"# fzf key bindings and completion" "# fzf"
"source \"${pkgs.fzf}/shell/key-bindings.zsh\"" "source \"${pkgs.fzf}/shell/key-bindings.zsh\""
"source \"${pkgs.fzf}/shell/completion.zsh\"" "source \"${pkgs.fzf}/shell/completion.zsh\""
"" ""
"# Load direnv" "# User customizations"
"eval \"$(direnv hook zsh)\""
""
"# Load nix-direnv (if using direnv with Nix)"
"if [ -f \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\" ]; then"
" source \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\""
"fi"
""
"# User-specific customizations"
"source \"${zshConfigDir}/custom.zsh\" 2>/dev/null" "source \"${zshConfigDir}/custom.zsh\" 2>/dev/null"
]; ];
# Optional: User customizations (managed separately) # User customizations
xdg.configFile."zsh/custom.zsh".text = '' xdg.configFile."zsh/custom.zsh".text = ''
# Add your custom aliases, functions, and exports here
export EDITOR="nvim" export EDITOR="nvim"
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
''; '';