Move vim packages to pkgs
Add system config Split up modules into home and system sets Update Cleanup Move home config Add module attrs Fix empty LUKS device UUID Import local secrets
This commit is contained in:
parent
4724f264dd
commit
e1c562191b
67 changed files with 1055 additions and 202 deletions
60
modules/home/zsh.nix
Normal file
60
modules/home/zsh.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.home.zsh;
|
||||
in {
|
||||
options.dadada.home.zsh = {
|
||||
enable = mkEnableOption "Enable ZSH config";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.fzf.enableZshIntegration = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
autocd = true;
|
||||
sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
};
|
||||
history = {
|
||||
extended = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
save = 100000;
|
||||
share = true;
|
||||
};
|
||||
plugins = [
|
||||
];
|
||||
initExtra = ''
|
||||
source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh
|
||||
source ~/.nix-profile/share/fzf/key-bindings.zsh
|
||||
source ~/.nix-profile/share/fzf/completion.zsh
|
||||
|
||||
preexec() { echo -n -e "\033]0;$1\007" }
|
||||
|
||||
PROMPT="%F{red}%?%f %F{green}%m%f:%F{blue}%~%f "
|
||||
RPROMPT='$(git_super_status)'
|
||||
#NIX_BUILD_SHELL="${pkgs.zsh}/bin/zsh"
|
||||
'';
|
||||
profileExtra = ''
|
||||
'';
|
||||
shellAliases = {
|
||||
gst = "git status";
|
||||
gco = "git commit";
|
||||
glo = "git log";
|
||||
gad = "git add";
|
||||
ls = "exa";
|
||||
ll = "exa -l";
|
||||
la = "exa -la";
|
||||
mv = "mv -i";
|
||||
cp = "cp -i";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.fzf
|
||||
pkgs.exa
|
||||
pkgs.zsh-git-prompt
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue