modularize zsh

This commit is contained in:
Fabian Montero 2024-11-29 00:44:04 -06:00
parent a5db281643
commit 4ec61784ed
5 changed files with 22 additions and 7 deletions

View file

@ -12,5 +12,6 @@
./yubikey.nix
./browsers.nix
./gui
./zsh
];
}

View file

@ -34,12 +34,6 @@ in {
};
};
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs;
};
programs.git = {
enable = true;
userEmail = "fabian@posixlycorrect.com";

View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.services.zsh;
in {
options.local.services.zsh.enable = mkEnableOption "zsh settings";
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs;
};
};
}

View file

@ -83,7 +83,7 @@
alias tree='tree -CF'
alias lock="betterlockscreen -l"
alias nightmode="${redshift}/bin/redshift -P -O 1000"
alias lightmode="${redshift}/bin/redshift -P -O 6500"
alias lightmode="${redshift}/bin/redshift -x="
alias inbox="echo >> $HOME/gtd/inbox"
alias nixoide="nix repl '<nixpkgs>'"
alias vps="ssh -A vps"

View file

@ -43,6 +43,8 @@
};
};
local.services.zsh.enable = true;
home = {
stateVersion = "21.11"; # No tocar esto
username = "fabian";