feat(zsh): add plugins module
This commit is contained in:
parent
6dba397306
commit
8f903a742a
4 changed files with 36 additions and 6 deletions
|
|
@ -7,10 +7,17 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
./plugins.nix
|
||||
];
|
||||
|
||||
config = mkIf (cfg.enable || admin.shell == "zsh") {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
|
|
|
|||
24
home/modules/console/shell/zsh/plugins.nix
Normal file
24
home/modules/console/shell/zsh/plugins.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, pkgs, config, osConfig, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.shell.zsh;
|
||||
admin = osConfig.ooknet.host.admin;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || admin.shell == "zsh") {
|
||||
programs.zsh.plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
file = "autopair.zsh";
|
||||
src = "${pkgs.zsh-autopair}/share/zsh/zsh-autopair";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
inherit (config.colorscheme) palette;
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib) mkIf getExe;
|
||||
|
||||
cfg = config.ooknet.media.music.tui;
|
||||
zellij = config.ooknet.multiplexer.zellij;
|
||||
|
|
@ -115,14 +115,14 @@ in
|
|||
tab name="spotify" focus=true {
|
||||
pane name="spotify" {
|
||||
borderless true
|
||||
command "spotify_player"
|
||||
command "${getExe pkgs.spotify-player}"
|
||||
focus true
|
||||
}
|
||||
pane name="Visualizer" {
|
||||
borderless false
|
||||
split_direction "horizontal"
|
||||
size "20%"
|
||||
command "cava"
|
||||
command "${getExe pkgs.cava}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
adminShell = config.ooknet.host.admin.shell;
|
||||
cfg = config.ooknet.shell.zsh;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (adminShell == "bash" || cfg.enable) {
|
||||
config = mkIf (adminShell == "bash" ) {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue