mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:08:11 +09:00
fix
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.zsh;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./system.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
options.my.applications.zsh = {
|
||||
enable = lib.mkEnableOption "Zsh shell";
|
||||
system.enable = lib.mkEnableOption "Zsh system configuration";
|
||||
homeManager.enable = lib.mkEnableOption "Zsh home-manager configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.zsh.system.enable = lib.mkDefault true;
|
||||
my.applications.zsh.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.applications.zsh.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.zsh.homeManager = {
|
||||
enable = lib.mkEnableOption "Zsh home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
plugins = [ "git" ];
|
||||
};
|
||||
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initContent = ''
|
||||
# ---- from gist: export / history size ----
|
||||
export HISTSIZE=999999999
|
||||
export HISTFILESIZE=999999999
|
||||
|
||||
# ---- from gist: setopt ----
|
||||
setopt extended_history
|
||||
setopt hist_allow_clobber
|
||||
setopt hist_fcntl_lock
|
||||
setopt hist_find_no_dups
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
# setopt hist_no_functions
|
||||
# setopt hist_no_store
|
||||
setopt hist_reduce_blanks
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_verify
|
||||
setopt inc_append_history_time
|
||||
|
||||
unsetopt SHARE_HISTORY
|
||||
setopt APPEND_HISTORY
|
||||
setopt INC_APPEND_HISTORY_TIME
|
||||
|
||||
# ---- from gist: aliases ----
|
||||
alias docker-compose="docker compose"
|
||||
alias clearsign='export GPG_TTY=$(tty) && openssl rand -hex 16 | gpg --clearsign'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.applications.zsh.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.zsh.system = {
|
||||
enable = lib.mkEnableOption "Zsh system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user