diff --git a/system/default.nix b/system/default.nix index 87cb7e9..cfe89ae 100644 --- a/system/default.nix +++ b/system/default.nix @@ -34,8 +34,9 @@ in { config = { boot.tmp.cleanOnBoot = true; - time.timeZone = cfg.timezone; console.keyMap = cfg.keymap; + time.timeZone = cfg.timezone; + environment.pathsToLink = ["/share/bash-completion" "/share/zsh"]; services = { orca.enable = false; envfs.enable = true; diff --git a/users/modules/shell/bash.nix b/users/modules/shell/bash.nix index 6448635..f299d42 100644 --- a/users/modules/shell/bash.nix +++ b/users/modules/shell/bash.nix @@ -16,6 +16,11 @@ in { lns = "ln -si"; }; }; + autocompletion = mkOption { + type = types.bool; + default = config.home.shell.autocompletion; + example = true; + }; eatIntegration = mkEnableOption "Enable Emacs Eat integration"; bashrcExtra = mkOption { type = types.lines; @@ -33,6 +38,7 @@ in { (strings.optionalString cfg.eatIntegration ''[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"'') cfg.bashrcExtra ]; + enableCompletion = cfg.autocompletion; shellAliases = cfg.aliases; shellOptions = [ "histappend" diff --git a/users/modules/shell/default.nix b/users/modules/shell/default.nix index 6d8752a..36d8133 100644 --- a/users/modules/shell/default.nix +++ b/users/modules/shell/default.nix @@ -88,6 +88,10 @@ in { default = {}; example = {la = "ls -a";}; }; + autocompletion = mkOption { + type = types.bool; + default = true; + }; }; config.home.shell = { enableShellIntegration = cfg.bash.enable or cfg.zsh.enable or cfg.fish.enable; diff --git a/users/modules/shell/fish.nix b/users/modules/shell/fish.nix index e04380d..ab392ac 100644 --- a/users/modules/shell/fish.nix +++ b/users/modules/shell/fish.nix @@ -17,6 +17,11 @@ in { lns = "ln -si"; }; }; + autocompletion = mkOption { + type = types.bool; + default = config.home.shell.autocompletion; + example = true; + }; extraShellInit = mkOption { type = types.lines; default = ""; @@ -26,6 +31,7 @@ in { config = lib.mkIf cfg.enable { programs.fish = { enable = true; + generateCompletions = cfg.autocompletion; shellAbbrs = cfg.abbrs; preferAbbrs = true; shellInit = with lib; diff --git a/users/modules/shell/zsh.nix b/users/modules/shell/zsh.nix index 8e09c61..b098604 100644 --- a/users/modules/shell/zsh.nix +++ b/users/modules/shell/zsh.nix @@ -17,6 +17,11 @@ in { lns = "ln -si"; }; }; + autocompletion = mkOption { + type = types.bool; + default = config.home.shell.autocompletion; + example = true; + }; eatIntegration = mkEnableOption "Enable Emacs Eat integration"; zshrcExtra = lib.mkOption { type = types.lines; @@ -32,7 +37,7 @@ in { enable = true; strategy = ["match_prev_cmd" "completion"]; }; - enableCompletion = true; + enableCompletion = cfg.autocompletion; enableVteIntegration = true; history = { findNoDups = true;