refactor(nixos:zsh): move options to hm module
This commit is contained in:
parent
9b2edd3782
commit
f9b620c54c
1 changed files with 7 additions and 12 deletions
|
|
@ -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"];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue