zsh: Added any-nix-shell. Removed bashrc handling
This commit is contained in:
parent
3eea13b718
commit
2893674f45
@ -1,19 +1,8 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ 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 = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -22,9 +11,9 @@ in
|
|||||||
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
||||||
theme = "bira";
|
theme = "bira";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".bashrc".text = ''
|
initExtra = ''
|
||||||
${optionalString (!builtins.hasAttr "users" config) "${exec_zsh}"}
|
any-nix-shell zsh --info-right | source /dev/stdin
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user