From bed5ef022f8b5ff3292a2d3fe57f88febb5fc000 Mon Sep 17 00:00:00 2001 From: "Janik H." Date: Fri, 12 Jul 2024 19:20:41 +0200 Subject: [PATCH] change the default user shell to zsh --- common/default.nix | 1 + common/zsh.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 common/zsh.nix diff --git a/common/default.nix b/common/default.nix index f178e2f..b329e4a 100644 --- a/common/default.nix +++ b/common/default.nix @@ -7,5 +7,6 @@ ./raito-proxy-aware-nginx.nix ./raito-vm.nix ./sysadmin + ./zsh.nix ]; } diff --git a/common/zsh.nix b/common/zsh.nix new file mode 100644 index 0000000..4f3d696 --- /dev/null +++ b/common/zsh.nix @@ -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} %/ \$ ' + ''; + }; +}