diff --git a/nixosModules/apps/shells/default.nix b/nixosModules/apps/shells/default.nix index 9169af8..03ae484 100644 --- a/nixosModules/apps/shells/default.nix +++ b/nixosModules/apps/shells/default.nix @@ -4,5 +4,6 @@ imports = [ ./fish ./xonsh + ./zsh ]; } diff --git a/nixosModules/apps/shells/zsh/default.nix b/nixosModules/apps/shells/zsh/default.nix new file mode 100644 index 0000000..5ede3d1 --- /dev/null +++ b/nixosModules/apps/shells/zsh/default.nix @@ -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 ]; + }; +} diff --git a/systems/onizuka/default.nix b/systems/onizuka/default.nix index 9a85e4a..65bf1ba 100644 --- a/systems/onizuka/default.nix +++ b/systems/onizuka/default.nix @@ -20,7 +20,8 @@ hyprland.enable = true; librewolf.enable = true; - xonsh.enable = true; + zsh.enable = true; + zsh.setDefault = true; syncthing.enable = true; steam.enable = true;