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