From c0c5087218c27e31c3e6f66f3937bff22fa0f647 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 24 Sep 2024 23:13:51 +0530 Subject: Using nix flake modules to manage the configurations. --- modules/shell/zsh/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 modules/shell/zsh/default.nix (limited to 'modules/shell/zsh/default.nix') diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix new file mode 100644 index 0000000..b4ea77a --- /dev/null +++ b/modules/shell/zsh/default.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: + +{ + options = { + zsh.enable = lib.mkEnableOption "Enables zsh."; + }; + + config = lib.mkIf config.zsh.enable { + programs.zsh.enable = true; + programs.zsh.dotDir = ".config/zsh"; + programs.zsh.history.path = "${config.xdg.cacheHome}/zsh/history"; + programs.zsh.initExtra = builtins.readFile ./zshrc; + programs.zsh.shellAliases = config.programs.bash.shellAliases; + }; +} -- cgit v1.2.3