zsh: init zsh module

This commit is contained in:
Artur Manuel 2025-04-20 11:25:47 +01:00
commit cb376aa64b
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q
2 changed files with 38 additions and 8 deletions

31
hosts/shared/zsh.nix Normal file
View file

@ -0,0 +1,31 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.alqueva.shells.zsh;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption mkPackageOption;
in
{
options.alqueva.shells.zsh = {
enable = mkEnableOption "zsh";
package = mkPackageOption pkgs "zsh" { };
};
config = mkIf cfg.enable {
environment = {
systemPackages = [ cfg.package ];
shells = [ cfg.package ];
};
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autosuggestions.enable = true;
};
};
}