my NixOS and nix-darwin config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more stuff

+135 -6
-5
hosts/Daedalus/default.nix
··· 9 9 10 10 fonts.packages = [ pkgs.monaspace ]; 11 11 12 - 13 - 14 - 15 - 16 12 homebrew = { 17 13 enable = true; 18 14 brews = [ ··· 20 16 "mas" 21 17 "borders" 22 18 "libiconv" 23 - "oh-my-posh" 24 19 "ifstat" 25 20 "libiconv" 26 21 # for twizzler
+11
modules/home/default.nix
··· 1 + { 2 + 3 + imports = [ 4 + ./tools 5 + ./prompts 6 + ./shells 7 + ./term 8 + ./wm 9 + 10 + ]; 11 + }
+1
modules/home/prompts/default.nix
··· 1 + { imports = [ ./oh-my-posh ]; }
+6 -1
modules/home/prompts/oh-my-posh/default.nix
··· 1 - { pkgs, ... }: { 1 + { lib, pkgs, ... }: 2 + with lib; 3 + 4 + let cfg = config.programs.oh-my-posh; 5 + in { 6 + config = mkIf (cfg.enable) { home.pakages = [ pkgs.oh-my-posh ]; }; 2 7 3 8 home.file.".config/oh-my-posh/theme.toml".source = ./mypure.omp.toml; 4 9
+8
modules/home/shells/default.nix
··· 1 + { 2 + imports = [ 3 + 4 + ./fish 5 + ./zsh 6 + 7 + ]; 8 + }
+100
modules/home/shells/zsh/default.nix
··· 1 + { lib, pkgs, ... }: 2 + with lib; 3 + 4 + let 5 + cfg = config.programs.zsh; 6 + zsh_history_fix = pkgs.writeShellScriptBin "zsh_history_fix" '' 7 + mv ~/.zsh_history ~/.zsh_history_bad 8 + strings ~/.zsh_history_bad > ~/.zsh_history 9 + fc -R ~/.zsh_history 10 + rm ~/.zsh_history_bad 11 + 12 + ''; 13 + in { 14 + 15 + options.programs.zsh = { enable = mkEnableOption "Zsh"; }; 16 + 17 + config = mkIf (cfg.enable) { 18 + 19 + programs.zoxide.enable = true; 20 + 21 + home.file.".config/oh-my-posh/theme.toml".source = ./mypure.omp.toml; 22 + 23 + home.packages = with pkgs; [ fd eza zsh_history_fix ]; 24 + programs.zsh = { 25 + enable = true; 26 + autocd = true; 27 + autosuggestion.enable = true; 28 + enableCompletion = true; 29 + syntaxHighlighting.enable = true; 30 + 31 + # TODO: these need to be fixed lmao 32 + shellAliases = { 33 + darl = "sudo darwin-rebuild switch --flake /Users/suri/dev/dots"; 34 + darling = '' 35 + cd /Users/suri/dev/dots && git add -A && git commit -m "." && sudo darwin-rebuild switch --flake /Users/suri/dev/dots && git push''; 36 + 37 + dots = "z ~/dev/dots"; 38 + fcd = '' 39 + cd "$(find ~/coding/ ~/storage/ -type d -not \( -path "*/.git/*" -o -path "*/target/*" -o -path "*/.venv/*" -o -path "*/node_modules/*" -o -path "*/venv/*" -o -path "*/build/*" -o -path "*/.*/*" \) -print 2>/dev/null | fzf)" ''; 40 + 41 + l = "exa"; 42 + ls = "exa"; 43 + 44 + lg = "lazygit"; 45 + 46 + cat = "bat"; 47 + 48 + zt = "zathura"; 49 + 50 + tars = 51 + "cd /Users/suri/dev/personal/tars/tars-tui && cargo run --release"; 52 + 53 + ezk = 54 + " /Users/suri/dev/personal/Emergence/target/release/emergence_cli"; 55 + }; 56 + 57 + initContent = '' 58 + eval `ssh-agent` &> /dev/null 59 + ssh-add ~/.ssh/github &> /dev/null 60 + 61 + eval "$(zoxide init zsh)" 62 + # eval "$(starship init zsh)" 63 + 64 + function y() { 65 + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" 66 + yazi "$@" --cwd-file="$tmp" 67 + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then 68 + cd -- "$cwd" 69 + fi 70 + rm -f -- "$tmp" 71 + } 72 + 73 + function tz() { 74 + if [ -z "$1" ]; then 75 + echo "Usage: tz <file.typ>" 76 + return 1 77 + fi 78 + 79 + input_file="$1" 80 + output_file="''${input_file%.typ}.pdf" # Replace .typ with .pdf 81 + 82 + typst watch "$input_file" "$output_file" & # Watch and compile Typst file 83 + sleep 1 # Give Typst some time to generate the PDF 84 + open "$output_file" # Open the generated PDF 85 + } 86 + 87 + export PATH="/opt/homebrew/opt/libiconv/bin:$PATH" 88 + export PATH="/Users/suri/.cargo/bin:$PATH" 89 + 90 + if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then 91 + # eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/di4am0nd.omp.json)" 92 + # eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/pure.omp.json)" 93 + eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.toml)" 94 + fi 95 + 96 + ''; 97 + }; 98 + }; 99 + 100 + }
+1
modules/home/term/default.nix
··· 1 + { imports = [ ./ghostty ]; }
+5
modules/home/wm/default.nix
··· 1 + { 2 + 3 + imports = [ ./hyprland ./aerospace ]; 4 + 5 + }
+1
modules/home/wm/hyprland/default.nix
··· 1 + { ... }: { }
+2
users/suri/common.nix
··· 9 9 # 10 10 imports = [ 11 11 12 + ../../modules/home 13 + 12 14 ../../modules/home/prompts/oh-my-posh 13 15 ../../modules/home/shells/zsh 14 16 ../../modules/home/term/ghostty