Add zsh shell, enable in onizuka
This commit is contained in:
parent
a43df02076
commit
7afb3bd74b
3 changed files with 23 additions and 1 deletions
20
nixosModules/apps/shells/zsh/default.nix
Normal file
20
nixosModules/apps/shells/zsh/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
zsh.enable = lib.mkEnableOption "Enables zsh";
|
||||
zsh.setDefault = lib.mkEnableOption "Sets zsh as the default user's shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.zsh.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
histFile = "$HOME/.config/zsh/history";
|
||||
histSize = 2000;
|
||||
};
|
||||
users.users.defaultUser.shell = lib.mkIf config.zsh.setDefault pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue