change the default user shell to zsh

This commit is contained in:
Janik Haag 2024-07-12 19:20:41 +02:00
parent 254e161c07
commit caa2af0bb5
No known key found for this signature in database
2 changed files with 20 additions and 3 deletions

View file

@ -1,10 +1,11 @@
{
imports = [
./admins.nix
./raito-vm.nix
./raito-proxy-aware-nginx.nix
./base-server.nix
./sysadmin
./hardening.nix
./raito-proxy-aware-nginx.nix
./raito-vm.nix
./sysadmin
./zsh.nix
];
}

16
common/zsh.nix Normal file
View file

@ -0,0 +1,16 @@
{ lib, pkgs, config, ... }: {
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
interactiveShellInit = ''
${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin
'';
promptInit = ''
# https://grml.org/zsh/grml-zsh-refcard.pdf
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
PS1='%n@${config.networking.fqdn} %/ \$ '
'';
};
}