mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-04-01 21:21:57 -04:00
modularize zsh args and add eslint_d alias
This commit is contained in:
parent
de910497fa
commit
4989c750ad
2 changed files with 33 additions and 25 deletions
|
@ -1,15 +1,28 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
node = pkgs.nodejs_22;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../prisma.nix
|
||||
../../../../customPackages
|
||||
../unstable.nix
|
||||
];
|
||||
programs = {
|
||||
zsh = {
|
||||
initExtra = ''
|
||||
eval "$(${node}/bin/node --completion-bash)"
|
||||
'';
|
||||
};
|
||||
};
|
||||
home = {
|
||||
shellAliases = {
|
||||
pd = "/home/meyer/dev/ts/pnpm/pnpm/dev/pd.js";
|
||||
webpack = "webpack-cli";
|
||||
pd = "/home/meyer/dev/ts/pnpm/pnpm/dev/pd.js";
|
||||
webpack = "webpack-cli";
|
||||
eslintd = "eslint_d";
|
||||
};
|
||||
packages = with pkgs;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
cpkg.chrome-pak-customizer
|
||||
lemminx
|
||||
|
@ -20,11 +33,12 @@
|
|||
typescript
|
||||
unstable.eslint
|
||||
unstable.corepack_23
|
||||
nodejs_22
|
||||
node
|
||||
vsce
|
||||
esbuild
|
||||
unstable.pnpm
|
||||
] ++ (with pkgs.nodePackages; [
|
||||
]
|
||||
++ (with pkgs.nodePackages; [
|
||||
webpack-cli
|
||||
nodemon
|
||||
ts-node
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
# TODO: make these modular
|
||||
_ = [
|
||||
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
|
||||
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
"eval \"$(${pkgs.nh}/bin/nh completions --shell=zsh)\""
|
||||
"eval \"$(${pkgs.nodejs_22}/bin/node --completion-bash)\""
|
||||
"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh"
|
||||
"setopt globstarshort"
|
||||
];
|
||||
zshInitArgs = lib.concatMapStrings (x: x + "\n") _;
|
||||
in
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
|
@ -19,7 +7,7 @@ in
|
|||
zsh-syntax-highlighting
|
||||
];
|
||||
sessionVariables = {
|
||||
POWERSHELL_PATH = "${pkgs.powershell}/bin/pwsh";
|
||||
POWERSHELL_PATH = "${pkgs.powershell}/bin/pwsh";
|
||||
};
|
||||
file = {
|
||||
p10k = {
|
||||
|
@ -31,11 +19,11 @@ in
|
|||
};
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
|
@ -44,7 +32,13 @@ in
|
|||
zsh = {
|
||||
enable = true;
|
||||
oh-my-zsh.enable = true;
|
||||
initExtra = zshInitArgs;
|
||||
initExtra = ''
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
eval "$(${pkgs.nh}/bin/nh completions --shell=zsh)"
|
||||
setopt globstarshort
|
||||
'';
|
||||
enableCompletion = true;
|
||||
plugins = [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue