Files
nixos/Droidnix/generated/parked/terminals/zsh.nix
T
2026-03-21 19:47:47 +00:00

43 lines
1.0 KiB
Nix

{ lib, pkgs, config, ... }:
let
programName = "zsh";
programAssets = ../../../assets/system/conf/${programName};
# Read the config file that will be injected into Zsh
zshInitFile = "${programAssets}/zsh.conf";
# Toggle for this module
enableProgram = config.enableZsh or false;
# User reference
username = config.defaultUser or "henrov";
in
{
# Top-level toggle
options.enableZsh = lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Only apply configuration if enabled
config = lib.mkIf enableProgram {
# Install Zsh system-wide
environment.systemPackages = [ pkgs.zsh ];
# Enable Zsh + Oh-My-Zsh
programs.zsh.enable = true;
programs.zsh.ohMyZsh.enable = true;
programs.zsh.ohMyZsh.theme = "catppuccin-mocha";
programs.zsh.ohMyZsh.plugins = [
"git"
"docker"
"direnv"
"zsh-autosuggestions"
"zsh-completions"
"zsh-history-substring-search"
];
# Use the contents of zsh.conf as shellInit
programs.zsh.shellInit = builtins.readFile zshInitFile;
};
}