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, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption;
|
inherit (lib) mkIf;
|
||||||
adminShell = config.ooknet.host.admin.shell;
|
adminShell = config.ooknet.host.admin.shell;
|
||||||
cfg = config.ooknet.shell.zsh;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config = mkIf (adminShell == "zsh") {
|
||||||
options.ooknet.shell.zsh.enable = mkEnableOption "Enable zsh module";
|
# enable nixpkgs module if zsh is the main users login shell
|
||||||
|
# configure with home-manager module
|
||||||
config = mkIf (adminShell == "zsh" || cfg.enable) {
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
# disable completion option as we configure with home-manager module
|
||||||
autosuggestions = {
|
enableCompletion = false;
|
||||||
enable = true;
|
|
||||||
async = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
environment.pathsToLink = ["/share/zsh"];
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue