refactor(nixos:zsh): move options to hm module

This commit is contained in:
ooks-io 2024-07-12 19:39:29 +12:00
parent 9b2edd3782
commit f9b620c54c

View file

@ -1,24 +1,19 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
inherit (lib) mkIf;
adminShell = config.ooknet.host.admin.shell;
cfg = config.ooknet.shell.zsh;
in
{
options.ooknet.shell.zsh.enable = mkEnableOption "Enable zsh module";
config = mkIf (adminShell == "zsh" || cfg.enable) {
config = mkIf (adminShell == "zsh") {
# enable nixpkgs module if zsh is the main users login shell
# configure with home-manager module
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autosuggestions = {
enable = true;
async = true;
};
# disable completion option as we configure with home-manager module
enableCompletion = false;
};
environment.pathsToLink = ["/share/zsh"];
};