v0.1.1
This commit is contained in:
parent
8b9d3c114d
commit
bcbd699c4c
11 changed files with 786 additions and 124 deletions
33
modules/home/rsydn/shell/tmux.nix
Normal file
33
modules/home/rsydn/shell/tmux.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = lib.mkDefault true;
|
||||
clock24 = true;
|
||||
historyLimit = 20000;
|
||||
mouse = true;
|
||||
baseIndex = 1;
|
||||
prefix = "C-a";
|
||||
escapeTime = 0;
|
||||
aggressiveResize = true;
|
||||
plugins = [{
|
||||
plugin = pkgs.tmuxPlugins.dracula;
|
||||
extraConfig = ''
|
||||
set -g @dracula-pane-border-style "fg=#44475a"
|
||||
set -g @dracula-plugins "cpu-usage battery network-bandwidth time"
|
||||
set -g @dracula-show-empty-plugins off
|
||||
set -g @dracula-refresh-rate 5
|
||||
'';
|
||||
}];
|
||||
extraConfig = ''
|
||||
set-option -g status-style "bg=#282a36 fg=#f8f8f2"
|
||||
set -g status-interval 5
|
||||
setw -g automatic-rename on
|
||||
set -g renumber-windows on
|
||||
bind r source-file ~/.tmux.conf \; display-message "tmux reloaded"
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
set -g display-panes-time 1500
|
||||
'';
|
||||
};
|
||||
}
|
||||
83
modules/home/rsydn/shell/zsh.nix
Normal file
83
modules/home/rsydn/shell/zsh.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.rsydn.shell.zsh;
|
||||
in {
|
||||
options.rsydn.shell.zsh = {
|
||||
enable = mkEnableOption "user zsh configuration managed by Home Manager";
|
||||
|
||||
theme = mkOption {
|
||||
type = types.str;
|
||||
default = "powerlevel10k/powerlevel10k";
|
||||
description = "Oh My Zsh theme name.";
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "Oh My Zsh plugins to load.";
|
||||
};
|
||||
|
||||
aliases = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Zsh command aliases.";
|
||||
};
|
||||
|
||||
extraBeforeCompInit = mkOption {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
description =
|
||||
"Extra script executed before compinit (useful for instant prompt).";
|
||||
};
|
||||
|
||||
extraAfter = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Additional script appended after Oh My Zsh loads.";
|
||||
};
|
||||
|
||||
enableAutoSuggestion = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable zsh-autosuggestions.";
|
||||
};
|
||||
|
||||
enableSyntaxHighlighting = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable zsh-syntax-highlighting.";
|
||||
};
|
||||
|
||||
enableVimMode = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable vi keybindings by running bindkey -v.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = cfg.enableAutoSuggestion;
|
||||
syntaxHighlighting.enable = cfg.enableSyntaxHighlighting;
|
||||
shellAliases = cfg.aliases;
|
||||
initExtraBeforeCompInit = cfg.extraBeforeCompInit;
|
||||
initExtraFirst = lib.optionalString cfg.enableVimMode ''
|
||||
bindkey -v
|
||||
'';
|
||||
initExtra = cfg.extraAfter;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = cfg.theme;
|
||||
plugins = cfg.plugins;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue