Compare commits

...

4 commits

Author SHA1 Message Date
Fabian Montero d10cf8b25f
update gpg settings 2024-11-29 12:48:00 -06:00
Fabian Montero 60fa9da64c
enable ssh-agent 2024-11-29 12:24:10 -06:00
Fabian Montero f77410de7c
update zshrc 2024-11-29 12:23:51 -06:00
Fabian Montero 06b9135417
fix typos 2024-11-29 11:35:32 -06:00
6 changed files with 38 additions and 13 deletions

View file

@ -15,5 +15,6 @@
./zsh
./gpg.nix
./defaultDesktopPack.nix
./accounts.nix
];
}

View file

@ -25,7 +25,19 @@ in {
services.gpg-agent = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
enableExtraSocket = true;
enableSshSupport = true;
defaultCacheTtl = 3600 * 3;
defaultCacheTtlSsh = 3600 * 3;
maxCacheTtl = 3600 * 6;
maxCacheTtlSsh = 3600 * 6;
pinentryPackage = pkgs.pinentry-emacs;
};

View file

@ -7,12 +7,19 @@
with lib; let
cfg = config.local.services.zsh;
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 {
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs;
initExtra = import ./zshrc.nix {inherit config lib pkgs;};
};
};
}

View file

@ -1,8 +1,7 @@
{
maim,
redshift,
xclip,
...
config,
lib,
pkgs
}: ''
# The following lines were added by compinstall
@ -73,17 +72,17 @@
return 0
}
PROMPT='%B[%~] ''${vcs_info_msg_0_}%b'
PROMPT='${config.local.services.zsh.prompt}'
# Aliases and binds
alias ls='ls --color -F'
alias l='ls --color -FhAltr'
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 lock="betterlockscreen -l"
alias nightmode="${redshift}/bin/redshift -P -O 1000"
alias lightmode="${redshift}/bin/redshift -x="
alias nightmode="${lib.getExe pkgs.redshift} -P -O 1000"
alias lightmode="${lib.getExe pkgs.redshift} -x="
alias inbox="echo >> $HOME/gtd/inbox"
alias nixoide="nix repl '<nixpkgs>'"
alias vps="ssh -A vps"

View file

@ -24,10 +24,13 @@
baseline.enable = true;
services = {
zsh.enable = true;
zsh = {
enable = true;
prompt = "%B[%~] \${vcs_info_msg_0_}%b";
};
accounts.enable = true;
gpg = {
enalbe = true;
enable = true;
defaultKey = "7AA277E604A4173916BBB4E91FFAC35E1798174F";
};
};

View file

@ -23,7 +23,10 @@ with lib; {
baseline.enable = true;
services = {
zsh.enable = true;
zsh = {
enable = true;
prompt = "%B<%~> \${vcs_info_msg_0_}%b";
};
};
apps = {