Add zsh, add home-manager

This commit is contained in:
Alexander Derevianko
2025-07-26 12:16:27 +02:00
parent 472ef2d0d0
commit baf2f6438f
8 changed files with 272 additions and 11 deletions
+7
View File
@@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
imports = [
./shell
];
}
+7
View File
@@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
imports = [
./zsh
];
}
+57
View File
@@ -0,0 +1,57 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.dov.shell.zsh;
in {
options.dov.shell.zsh = {
enable = mkEnableOption "zsh config";
shellAliases = mkOption {
type = types.attrs;
default = {};
};
};
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
history = {
save = 10000;
};
initContent = ''
'';
plugins = [
{
# will source zsh-autosuggestions.plugin.zsh
name = "zsh-autosuggestions";
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-autosuggestions";
rev = "v0.7.0";
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
};
}
{
# will source zsh-autosuggestions.plugin.zsh
name = "zsh-syntax-highlighting";
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-syntax-highlighting";
rev = "0.7.0";
sha256 = "eRTk0o35QbPB9kOIV0iDwd0j5P/yewFFISVS/iEfP2g=";
};
}
];
oh-my-zsh = {
enable = true;
theme = "bira";
plugins = [ "git" "sudo" ];
};
} // (lib.optionalAttrs (cfg.shellAliases != null) {
shellAliases = cfg.shellAliases;
});
};
}