45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ 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";
|
|
|
|
# Helper to fetch an external plugin from GitHub
|
|
fetchPlugin = { owner, repo, rev, sha256 }: pkgs.fetchFromGitHub {
|
|
inherit owner repo rev sha256;
|
|
};
|
|
in
|
|
{
|
|
# Ensure zsh is installed system-wide
|
|
environment.systemPackages = [ pkgs.zsh ];
|
|
|
|
# Home Manager configuration for the default user
|
|
home.username = username;
|
|
home.homeDirectory = homeDir;
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
ohMyZsh = {
|
|
enable = true;
|
|
theme = "catppuccin-mocha";
|
|
|
|
# Standard built-in plugins
|
|
plugins = [
|
|
"git"
|
|
"docker"
|
|
"direnv"
|
|
"zsh-autosuggestions"
|
|
"zsh-completions"
|
|
"zsh-history-substring-search"
|
|
];
|
|
|
|
# Inject custom Zsh configuration
|
|
shellInit = builtins.readFile zshInitFile;
|
|
};
|
|
};
|
|
}
|