diff --git a/roles/home/zsh.nix b/roles/home/zsh.nix index d126dc6..60cadbe 100644 --- a/roles/home/zsh.nix +++ b/roles/home/zsh.nix @@ -1,19 +1,8 @@ { config, pkgs, lib, ... }: -let - inherit (pkgs.lib) optionalString; - - # not having the attribute users means - # we cannot change the default shell (e.g. this is not a NixOS host) - exec_zsh = '' -# if [ -f "$HOME/.bashrc" ]; then -# . "$HOME/.bashrc" -# fi - - exec ${pkgs.zsh}/bin/zsh - ''; -in { + home.packages = with pkgs; [ any-nix-shell ]; + programs.zsh = { enable = true; @@ -22,9 +11,9 @@ in plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ]; theme = "bira"; }; - }; - home.file.".bashrc".text = '' - ${optionalString (!builtins.hasAttr "users" config) "${exec_zsh}"} - ''; + initExtra = '' + any-nix-shell zsh --info-right | source /dev/stdin + ''; + }; }