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
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./plugins.nix
|
||||||
|
];
|
||||||
|
|
||||||
config = mkIf (cfg.enable || admin.shell == "zsh") {
|
config = mkIf (cfg.enable || admin.shell == "zsh") {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autocd = true;
|
autocd = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
history = {
|
history = {
|
||||||
expireDuplicatesFirst = true;
|
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
|
let
|
||||||
inherit (config.colorscheme) palette;
|
inherit (config.colorscheme) palette;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf getExe;
|
||||||
|
|
||||||
cfg = config.ooknet.media.music.tui;
|
cfg = config.ooknet.media.music.tui;
|
||||||
zellij = config.ooknet.multiplexer.zellij;
|
zellij = config.ooknet.multiplexer.zellij;
|
||||||
|
|
@ -115,14 +115,14 @@ in
|
||||||
tab name="spotify" focus=true {
|
tab name="spotify" focus=true {
|
||||||
pane name="spotify" {
|
pane name="spotify" {
|
||||||
borderless true
|
borderless true
|
||||||
command "spotify_player"
|
command "${getExe pkgs.spotify-player}"
|
||||||
focus true
|
focus true
|
||||||
}
|
}
|
||||||
pane name="Visualizer" {
|
pane name="Visualizer" {
|
||||||
borderless false
|
borderless false
|
||||||
split_direction "horizontal"
|
split_direction "horizontal"
|
||||||
size "20%"
|
size "20%"
|
||||||
command "cava"
|
command "${getExe pkgs.cava}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
adminShell = config.ooknet.host.admin.shell;
|
adminShell = config.ooknet.host.admin.shell;
|
||||||
cfg = config.ooknet.shell.zsh;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
config = mkIf (adminShell == "bash" || cfg.enable) {
|
config = mkIf (adminShell == "bash" ) {
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue