Main
This commit is contained in:
parent
fc0abdd4bb
commit
aca73cdd0f
73 changed files with 3873 additions and 381 deletions
|
|
@ -1,3 +1,17 @@
|
|||
# Zsh (System Module)
|
||||
#
|
||||
# Provides:
|
||||
# - Zsh shell
|
||||
# - oh-my-zsh integration
|
||||
# - Theme + plugins support
|
||||
#
|
||||
# Options:
|
||||
# - enable → Enable Zsh system module
|
||||
# - ohMyZsh → Enable oh-my-zsh integration
|
||||
# - theme → oh-my-zsh theme (default: "xiong-chiamiov-plus")
|
||||
# - plugins → List of oh-my-zsh plugins (default: [ "git" ])
|
||||
#
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
|
@ -5,16 +19,34 @@ let
|
|||
in
|
||||
{
|
||||
options.nyx-module.system.zsh = {
|
||||
enable = lib.mkEnableOption "Enable zsh (system) module";
|
||||
enable = lib.mkEnableOption "Enable Zsh (system module)";
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.zsh;
|
||||
description = "Package to install for zsh.";
|
||||
ohMyZsh = lib.mkEnableOption "Enable oh-my-zsh integration";
|
||||
|
||||
theme = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "xiong-chiamiov-plus";
|
||||
description = "oh-my-zsh theme to use.";
|
||||
};
|
||||
|
||||
plugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "git" ];
|
||||
description = "List of oh-my-zsh plugins to enable.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
ohMyZsh = lib.mkIf cfg.ohMyZsh {
|
||||
enable = true;
|
||||
theme = cfg.theme;
|
||||
plugins = cfg.plugins;
|
||||
};
|
||||
};
|
||||
|
||||
# Add zsh to available shells
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue