❄️ Dotfiles for our NixOS system configuration.
at master 1.7 kB view raw
1{ 2 lib, 3 pkgs, 4 osConfig, 5 config, 6 ... 7}: 8 9{ 10 programs.zsh = { 11 enable = true; 12 enableCompletion = true; 13 syntaxHighlighting.enable = true; 14 autosuggestion.enable = true; 15 16 # zsh configuration file using XDG config directory 17 dotDir = "${config.xdg.configHome}/zsh"; 18 19 initContent = '' 20 # Add Homebrew to PATH on macOS 21 ${lib.optionalString pkgs.stdenv.isDarwin '' 22 eval "$(/opt/homebrew/bin/brew shellenv)" 23 ''} 24 ''; 25 26 envExtra = '' 27 export PRISMA_SCHEMA_ENGINE_BINARY="${pkgs.prisma-engines}/bin/schema-engine" 28 export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine" 29 export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node" 30 export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine" 31 export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt" 32 ''; 33 34 shellAliases = lib.mkMerge [ 35 { 36 cat = "bat"; 37 cd = "z"; 38 ls = "eza"; 39 } 40 41 (lib.mkIf (osConfig ? wsl) { 42 ssh = "ssh.exe"; 43 ssh-add = "ssh-add.exe"; 44 }) 45 ]; 46 47 oh-my-zsh = { 48 enable = true; 49 plugins = [ 50 "1password" 51 "bun" 52 "colored-man-pages" 53 "docker" 54 "docker-compose" 55 "git" 56 "vscode" 57 ]; 58 }; 59 60 plugins = [ 61 { 62 name = "powerlevel10k-config"; 63 src = ../../files; 64 file = "p10k.zsh"; 65 } 66 { 67 name = "zsh-powerlevel10k"; 68 src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/"; 69 file = "powerlevel10k.zsh-theme"; 70 } 71 ]; 72 }; 73}