my system configurations ^-^
at main 3.0 kB view raw
1# Adapted from https://github.com/isabelroses/dotfiles/blob/main/home/comfy/packages/cli/starship.nix under EUPL-1.2 license 2{ 3 lib, 4 config, 5 osConfig, 6 ... 7}: let 8 cfg = osConfig.settings.programs; 9 # ss = symbol: style: { 10 # inherit symbol; 11 # format = "[$symbol ](${style})"; 12 # }; 13 ssv = symbol: style: { 14 inherit symbol; 15 format = "via [$symbol](${style})"; 16 }; 17in { 18 config = lib.mkIf (cfg.cli.enable 19 && cfg.categories.core.enable) { 20 programs.starship = { 21 enable = true; 22 enableBashIntegration = config.programs.bash.enable; 23 enableFishIntegration = config.programs.fish.enable; 24 enableZshIntegration = config.programs.zsh.enable; 25 enableNushellIntegration = config.programs.nushell.enable; 26 27 settings = { 28 add_newline = false; 29 30 character = { 31 success_symbol = "[](pink)"; 32 error_symbol = "[](red)"; 33 }; 34 35 username = { 36 style_user = "white"; 37 style_root = "black"; 38 format = "[$user]($style) "; 39 show_always = false; 40 }; 41 42 directory = { 43 truncation_length = 10; 44 truncate_to_repo = true; 45 read_only_style = "197"; 46 read_only = " "; 47 format = "[$path]($style)[$read_only]($read_only_style) "; 48 49 # substitutions = { 50 # "󰋞 /docs" = "󰈙 "; 51 # "󰈙 /school" = "󰑴 "; 52 # "󰋞 /downloads" = " "; 53 # "󰋞 /tmp" = " "; 54 # "󰋞 /media/music" = " "; 55 # "󰋞 /media/pictures" = " "; 56 # "󰋞 /media/videos" = " "; 57 # "󰋞 /media/3dp" = " "; 58 # "󰋞 /git" = "󱌢 "; 59 # "󰋞 /.config" = " "; 60 # }; 61 }; 62 63 # container = ss " 󰏖" "yellow dimmed"; 64 # python = ss "" "yellow"; 65 # nodejs = ss " " "yellow"; 66 # lua = ss "󰢱 " "blue"; 67 # rust = ss "" "red"; 68 # java = ss " " "red"; 69 # c = ss " " "blue"; 70 # golang = ss "" "blue"; 71 # docker_context = ss " " "blue"; 72 bun.disabled = true; 73 74 nix_shell = ssv " " "blue"; 75 76 git_branch = { 77 symbol = "󰊢 "; 78 format = "on [$symbol$branch]($style) "; 79 truncation_length = 4; 80 truncation_symbol = "/"; 81 style = "bold green"; 82 }; 83 84 git_status = { 85 format = "[\\($all_status$ahead_behind\\)]($style) "; 86 style = "bold green"; 87 conflicted = " "; 88 up_to_date = " "; 89 untracked = " "; 90 ahead = "\${count}"; 91 diverged = "\${ahead_count}\${behind_count}"; 92 behind = "\${count}"; 93 stashed = "󰏗 "; 94 modified = " "; 95 staged = "[++\\($count\\)](green)"; 96 renamed = "󰖷 "; 97 deleted = " "; 98 }; 99 100 battery.disabled = true; 101 }; 102 }; 103 }; 104}