let's hope this doesn't break everything :3
This commit is contained in:
parent
608f093290
commit
2f85fb1b3b
21 changed files with 176 additions and 224 deletions
36
modules/applications/zsh.nix
Normal file
36
modules/applications/zsh.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.modules.apps.zsh;
|
||||
in
|
||||
{
|
||||
options.modules.apps.zsh = {
|
||||
enable = lib.mkEnableOption "enable zsh with oh-my-zsh";
|
||||
enableAliases = lib.mkEnableOption "whether to enable shellAliases";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable=true;
|
||||
enableZshIntegration=true;
|
||||
nix-direnv.enable=true;
|
||||
};
|
||||
programs.zsh = {
|
||||
enable=true;
|
||||
shellAliases = lib.mkIf cfg.enableAliases {
|
||||
ll = "lsd -l";
|
||||
lt = "lsd -l --tree";
|
||||
update = "nix flake update --commit-lock-file $HOME/nixos && sudo nixos-rebuild switch --flake $HOME/nixos";
|
||||
};
|
||||
history = {
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
size = 10000;
|
||||
};
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
theme = "frisk";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue