update zshrc
This commit is contained in:
parent
06b9135417
commit
f77410de7c
|
@ -7,12 +7,19 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.local.services.zsh;
|
cfg = config.local.services.zsh;
|
||||||
in {
|
in {
|
||||||
options.local.services.zsh.enable = mkEnableOption "zsh settings";
|
options.local.services.zsh = {
|
||||||
|
enable = mkEnableOption "zsh settings";
|
||||||
|
prompt = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "prompt for your terminal";
|
||||||
|
example = literalExpression "%B[%~] \${vcs_info_msg_0_}%b";
|
||||||
|
};
|
||||||
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
initExtra = import ./zshrc.nix pkgs;
|
initExtra = import ./zshrc.nix {inherit config lib pkgs;};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{
|
||||||
maim,
|
config,
|
||||||
redshift,
|
lib,
|
||||||
xclip,
|
pkgs
|
||||||
...
|
|
||||||
}: ''
|
}: ''
|
||||||
# The following lines were added by compinstall
|
# The following lines were added by compinstall
|
||||||
|
|
||||||
|
@ -73,17 +72,17 @@
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT='%B[%~] ''${vcs_info_msg_0_}%b'
|
PROMPT='${config.local.services.zsh.prompt}'
|
||||||
|
|
||||||
# Aliases and binds
|
# Aliases and binds
|
||||||
alias ls='ls --color -F'
|
alias ls='ls --color -F'
|
||||||
alias l='ls --color -FhAltr'
|
alias l='ls --color -FhAltr'
|
||||||
alias x='killall --ignore-case --user=$(whoami) --interactive'
|
alias x='killall --ignore-case --user=$(whoami) --interactive'
|
||||||
alias sc='${maim}/bin/maim -s -u | ${xclip}/bin/xclip -selection clipboard -t image/png -i'
|
alias sc='${lib.getExe pkgs.maim} -s -u | ${lib.getExe pkgs.xclip} -selection clipboard -t image/png -i'
|
||||||
alias tree='tree -CF'
|
alias tree='tree -CF'
|
||||||
alias lock="betterlockscreen -l"
|
alias lock="betterlockscreen -l"
|
||||||
alias nightmode="${redshift}/bin/redshift -P -O 1000"
|
alias nightmode="${lib.getExe pkgs.redshift} -P -O 1000"
|
||||||
alias lightmode="${redshift}/bin/redshift -x="
|
alias lightmode="${lib.getExe pkgs.redshift} -x="
|
||||||
alias inbox="echo >> $HOME/gtd/inbox"
|
alias inbox="echo >> $HOME/gtd/inbox"
|
||||||
alias nixoide="nix repl '<nixpkgs>'"
|
alias nixoide="nix repl '<nixpkgs>'"
|
||||||
alias vps="ssh -A vps"
|
alias vps="ssh -A vps"
|
||||||
|
|
|
@ -24,7 +24,10 @@
|
||||||
baseline.enable = true;
|
baseline.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
zsh.enable = true;
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
prompt = "%B[%~] \${vcs_info_msg_0_}%b";
|
||||||
|
};
|
||||||
accounts.enable = true;
|
accounts.enable = true;
|
||||||
gpg = {
|
gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -23,7 +23,10 @@ with lib; {
|
||||||
baseline.enable = true;
|
baseline.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
zsh.enable = true;
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
prompt = "%B<%~> \${vcs_info_msg_0_}%b";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
|
|
Loading…
Reference in a new issue