Regenerated
This commit is contained in:
+29
-17
@@ -1218,32 +1218,44 @@ This sets up the zsh in the terminal
|
||||
|
||||
let
|
||||
username = config.users.users.defaultUser or "henrov";
|
||||
homeDir = "/home/${username}";
|
||||
programName = "zsh";
|
||||
programAssets = ../../../assets/system/conf/${programName};
|
||||
zshInitFile = "${programAssets}/zsh.conf";
|
||||
in
|
||||
{
|
||||
# Make sure Zsh is available to the user
|
||||
home.packages = [ pkgs.zsh ];
|
||||
#################################
|
||||
# SYSTEM-WIDE INSTALLATION ONLY #
|
||||
#################################
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# Install Zsh and Oh-My-Zsh globally
|
||||
environment.systemPackages = [
|
||||
pkgs.zsh
|
||||
pkgs.oh-my-zsh # this is the Nixpkgs oh-my-zsh package
|
||||
];
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
theme = "catppuccin-mocha";
|
||||
#######################################
|
||||
# USER-SPECIFIC CONFIGURATION (henrov)#
|
||||
#######################################
|
||||
|
||||
# Only built-in plugins
|
||||
plugins = [
|
||||
"git"
|
||||
"docker"
|
||||
"direnv"
|
||||
"zsh-completions"
|
||||
];
|
||||
};
|
||||
# Copy a pre-built .zshrc into henrov's home
|
||||
environment.etc."zshrc-${username}".text = ''
|
||||
# Point Zsh to the Oh-My-Zsh installation in /run/current-system/sw
|
||||
export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh
|
||||
ZSH_THEME="catppuccin-mocha"
|
||||
plugins=(git docker direnv zsh-completions)
|
||||
|
||||
# Inject extra Zsh config
|
||||
shellInit = builtins.readFile zshInitFile;
|
||||
# Load oh-my-zsh
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Inject custom zsh.conf
|
||||
${builtins.readFile zshInitFile}
|
||||
'';
|
||||
|
||||
# Symlink it to user's ~/.zshrc
|
||||
users.users."${username}".shell = pkgs.zsh;
|
||||
users.users."${username}".extraHomeFiles = {
|
||||
".zshrc" = "/etc/zshrc-${username}";
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Reference in New Issue
Block a user