flake: Initialise new repository
This commit is contained in:
commit
1eb25ada72
41 changed files with 1657 additions and 0 deletions
12
modules/home-manager/shell/bat.nix
Normal file
12
modules/home-manager/shell/bat.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs.bat-extras; [ batman ];
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
"cat" = "bat";
|
||||
"man" = "batman";
|
||||
};
|
||||
}
|
||||
49
modules/home-manager/shell/default.nix
Normal file
49
modules/home-manager/shell/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
imports = [
|
||||
./bat.nix
|
||||
# ./fish.nix
|
||||
./starship.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
"deploy" =
|
||||
"ssh -t galanthus 'cd ~/.config/nix; git pull --rebase; sudo nixos-rebuild switch --flake ~/.config/nix'";
|
||||
"mv" = "mv -i";
|
||||
"rm" = "trash";
|
||||
"tree" = "lt";
|
||||
"zz" = "z -";
|
||||
};
|
||||
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
warn_timeout = "1m";
|
||||
hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
};
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultCommand = "fd --type f --strip-cwd-prefix --hidden --follow --exclude .git";
|
||||
fileWidgetCommand = "fd --type f --strip-cwd-prefix --hidden --follow --exclude .git";
|
||||
fileWidgetOptions = [ "--preview 'bat --color=always {}'" ];
|
||||
};
|
||||
|
||||
fd.enable = true;
|
||||
|
||||
ripgrep = {
|
||||
enable = true;
|
||||
arguments = [ "--ignore-case" ];
|
||||
};
|
||||
|
||||
zoxide.enable = true;
|
||||
};
|
||||
}
|
||||
22
modules/home-manager/shell/fish.nix
Normal file
22
modules/home-manager/shell/fish.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
interactiveShellInit = # fish
|
||||
''
|
||||
set fish_greeting
|
||||
set fish_vi_key_bindings
|
||||
set fish_vi_cursor
|
||||
|
||||
eval $(/opt/homebrew/bin/brew shellenv fish)
|
||||
'';
|
||||
|
||||
shellAbbrs = {
|
||||
gs = "git status";
|
||||
gc = "git commit";
|
||||
gca = "git commit -a";
|
||||
gcaa = "git commit -a --amend";
|
||||
gco = "git checkout";
|
||||
};
|
||||
};
|
||||
}
|
||||
94
modules/home-manager/shell/starship.nix
Normal file
94
modules/home-manager/shell/starship.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_status"
|
||||
"$git_metrics"
|
||||
"$git_state"
|
||||
"$nodejs"
|
||||
"$rust"
|
||||
"$golang"
|
||||
"$python"
|
||||
"$typst"
|
||||
"$gleam"
|
||||
"$fill"
|
||||
"$nix_shell"
|
||||
"$shell"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
fill = {
|
||||
symbol = " ";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](green)";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](blue)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "blue";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[$branch(:$remote_branch)](white) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "cyan";
|
||||
};
|
||||
|
||||
nodejs = {
|
||||
symbol = "nodejs";
|
||||
format = "[$symbol ($version )](green)";
|
||||
};
|
||||
|
||||
rust = {
|
||||
symbol = "rust";
|
||||
format = "[$symbol ($version )](red)";
|
||||
};
|
||||
|
||||
python = {
|
||||
symbol = "python";
|
||||
format = "[$symbol ($version )](yellow)";
|
||||
};
|
||||
|
||||
golang = {
|
||||
symbol = "go";
|
||||
format = "[$symbol ($version )](green)";
|
||||
};
|
||||
|
||||
typst = {
|
||||
symbol = "typst";
|
||||
format = "[$symbol ($version )](green)";
|
||||
};
|
||||
|
||||
gleam = {
|
||||
symbol = "gleam";
|
||||
format = "[$symbol ($version )](purple)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = "nix";
|
||||
heuristic = true;
|
||||
format = "[$symbol ($state $name )](red)";
|
||||
};
|
||||
|
||||
shell = {
|
||||
disabled = false;
|
||||
fish_indicator = "fish ";
|
||||
format = "[$indicator](purple)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
40
modules/home-manager/shell/zsh.nix
Normal file
40
modules/home-manager/shell/zsh.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# enableVteIntegration = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
path = "${config.xdg.stateHome}/zsh/zsh_history";
|
||||
extended = true;
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
autocd = true;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [
|
||||
"main"
|
||||
"cursor"
|
||||
"brackets"
|
||||
"root"
|
||||
];
|
||||
};
|
||||
initContent = # sh
|
||||
''
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
|
||||
setopt COMPLETE_IN_WORD
|
||||
setopt ALWAYS_TO_END
|
||||
setopt PATH_DIRS
|
||||
setopt AUTO_MENU
|
||||
setopt AUTO_LIST
|
||||
setopt MENU_COMPLETE
|
||||
'';
|
||||
|
||||
completionInit = # sh
|
||||
''
|
||||
autoload -U compinit && compinit
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue