Regenerated
This commit is contained in:
+8
-36
@@ -1216,47 +1216,19 @@ This sets up the zsh in the terminal
|
||||
#+BEGIN_SRC nix :tangle generated/modules/terminals/zsh.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
username = config.users.users.defaultUser or "henrov";
|
||||
homeDir = "/home/${username}";
|
||||
programName = "zsh";
|
||||
programAssets = ../../../assets/system/conf/${programName};
|
||||
zshInitFile = "${programAssets}/zsh.conf";
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# SYSTEM-WIDE INSTALLATION ONLY #
|
||||
#################################
|
||||
|
||||
# Install Zsh and Oh-My-Zsh globally
|
||||
################################################
|
||||
# Install Zsh and Oh-My-Zsh system-wide
|
||||
################################################
|
||||
environment.systemPackages = [
|
||||
pkgs.zsh
|
||||
pkgs.oh-my-zsh # this is the Nixpkgs oh-my-zsh package
|
||||
pkgs.oh-my-zsh
|
||||
];
|
||||
|
||||
#######################################
|
||||
# USER-SPECIFIC CONFIGURATION (henrov)#
|
||||
#######################################
|
||||
|
||||
# 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)
|
||||
|
||||
# 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}";
|
||||
};
|
||||
################################################
|
||||
# Make Zsh the default shell for all users (optional)
|
||||
################################################
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user