nixos configs

replace powerlevel10k with starship, add starship-jj for jj prompt info

+228 -15
+101 -2
flake.lock
··· 146 146 "type": "github" 147 147 } 148 148 }, 149 + "fenix": { 150 + "inputs": { 151 + "nixpkgs": [ 152 + "starship-jj", 153 + "nixpkgs" 154 + ], 155 + "rust-analyzer-src": "rust-analyzer-src" 156 + }, 157 + "locked": { 158 + "lastModified": 1768113825, 159 + "narHash": "sha256-f09fAifGPEuRrz1DFY910jexq0DaBuQBbq7WcxQIUgs=", 160 + "owner": "nix-community", 161 + "repo": "fenix", 162 + "rev": "55106e04d905c6a7726d0f6be77ed39a99f66a61", 163 + "type": "github" 164 + }, 165 + "original": { 166 + "owner": "nix-community", 167 + "repo": "fenix", 168 + "type": "github" 169 + } 170 + }, 149 171 "firefox-addons": { 150 172 "inputs": { 151 173 "nixpkgs": [ ··· 314 336 }, 315 337 "flake-utils_2": { 316 338 "inputs": { 317 - "systems": "systems_8" 339 + "systems": [ 340 + "starship-jj", 341 + "systems" 342 + ] 343 + }, 344 + "locked": { 345 + "lastModified": 1731533236, 346 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 347 + "owner": "numtide", 348 + "repo": "flake-utils", 349 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 350 + "type": "github" 351 + }, 352 + "original": { 353 + "owner": "numtide", 354 + "repo": "flake-utils", 355 + "type": "github" 356 + } 357 + }, 358 + "flake-utils_3": { 359 + "inputs": { 360 + "systems": "systems_9" 318 361 }, 319 362 "locked": { 320 363 "lastModified": 1681202837, ··· 818 861 "nixpkgs": "nixpkgs_3", 819 862 "nixvim": "nixvim", 820 863 "noctalia": "noctalia", 864 + "starship-jj": "starship-jj", 821 865 "vscode-server": "vscode-server", 822 866 "zen-browser": "zen-browser" 867 + } 868 + }, 869 + "rust-analyzer-src": { 870 + "flake": false, 871 + "locked": { 872 + "lastModified": 1768083390, 873 + "narHash": "sha256-TGWPJq2mXwxfAe83iZ18DIqXC4sOSj7RkW9b59h6Ox4=", 874 + "owner": "rust-lang", 875 + "repo": "rust-analyzer", 876 + "rev": "e42e8ff582ba12a88b6845525d08b6428e6d0fb9", 877 + "type": "github" 878 + }, 879 + "original": { 880 + "owner": "rust-lang", 881 + "ref": "nightly", 882 + "repo": "rust-analyzer", 883 + "type": "github" 884 + } 885 + }, 886 + "starship-jj": { 887 + "inputs": { 888 + "fenix": "fenix", 889 + "flake-utils": "flake-utils_2", 890 + "nixpkgs": [ 891 + "nixpkgs" 892 + ], 893 + "systems": "systems_8" 894 + }, 895 + "locked": { 896 + "lastModified": 1771062192, 897 + "narHash": "sha256-gOGLVeKtoWJrcaESPfULDnohntqBe+hzBhvDiF935Cs=", 898 + "owner": "lanastara_foss", 899 + "repo": "starship-jj", 900 + "rev": "e2fe1544fe92198427a1fcc1dfad9dbccf93ce79", 901 + "type": "gitlab" 902 + }, 903 + "original": { 904 + "owner": "lanastara_foss", 905 + "repo": "starship-jj", 906 + "type": "gitlab" 823 907 } 824 908 }, 825 909 "systems": { ··· 942 1026 "type": "github" 943 1027 } 944 1028 }, 1029 + "systems_9": { 1030 + "locked": { 1031 + "lastModified": 1681028828, 1032 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 1033 + "owner": "nix-systems", 1034 + "repo": "default", 1035 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 1036 + "type": "github" 1037 + }, 1038 + "original": { 1039 + "owner": "nix-systems", 1040 + "repo": "default", 1041 + "type": "github" 1042 + } 1043 + }, 945 1044 "treefmt-nix": { 946 1045 "inputs": { 947 1046 "nixpkgs": [ ··· 986 1085 }, 987 1086 "vscode-server": { 988 1087 "inputs": { 989 - "flake-utils": "flake-utils_2", 1088 + "flake-utils": "flake-utils_3", 990 1089 "nixpkgs": [ 991 1090 "nixpkgs" 992 1091 ]
+4
flake.nix
··· 66 66 url = "github:nix-community/nix-jetbrains-plugins"; 67 67 inputs.nixpkgs.follows = "nixpkgs"; 68 68 }; 69 + starship-jj = { 70 + url = "gitlab:lanastara_foss/starship-jj"; 71 + inputs.nixpkgs.follows = "nixpkgs"; 72 + }; 69 73 }; 70 74 71 75 outputs =
+123 -13
modules/home/shell/default.nix
··· 1 - { pkgs, config, ... }: 1 + { pkgs, config, inputs, ... }: 2 2 { 3 3 programs.zsh = { 4 4 enable = true; ··· 19 19 eval "$(${pkgs.mcfly}/bin/mcfly init zsh)" 20 20 ''; 21 21 plugins = with pkgs; [ 22 - # theme 23 - { 24 - name = "powerline10k"; 25 - src = pkgs.zsh-powerlevel10k; 26 - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; 27 - } 28 - { 29 - name = "powerline10k-config"; 30 - src = ./.; 31 - file = "p10k.zsh"; 32 - } 33 - 34 22 { 35 23 name = "formarks"; 36 24 src = fetchFromGitHub { ··· 66 54 } 67 55 ]; 68 56 }; 57 + 58 + programs.starship = { 59 + enable = true; 60 + settings = { 61 + format = builtins.concatStringsSep "" [ 62 + "$hostname" 63 + "$character" 64 + ]; 65 + right_format = builtins.concatStringsSep "" [ 66 + "$cmd_duration" 67 + "$jobs" 68 + "\${custom.jj}" 69 + "$directory" 70 + "\${custom.jj_branch}" 71 + ]; 72 + add_newline = false; 73 + character = { 74 + success_symbol = "[\\$](bright-black)"; 75 + error_symbol = "[\\$](red)"; 76 + }; 77 + directory = { 78 + truncation_length = 3; 79 + format = " [$path]($style)[$read_only]($read_only_style)"; 80 + }; 81 + custom.jj = { 82 + command = "prompt"; 83 + format = "$output"; 84 + ignore_timeout = true; 85 + shell = ["${inputs.starship-jj.packages.${pkgs.system}.default}/bin/starship-jj" "--ignore-working-copy" "starship"]; 86 + use_stdin = false; 87 + when = true; 88 + }; 89 + custom.jj_branch = { 90 + command = ''jj log --no-graph -r 'latest(::@ & (bookmarks() | remote_bookmarks()))' -T 'coalesce(bookmarks.join(", "), remote_bookmarks.join(", "))' 2>/dev/null''; 91 + when = "jj root 2>/dev/null"; 92 + format = " [$output]($style)"; 93 + style = "bold yellow"; 94 + }; 95 + git_branch.disabled = true; 96 + git_status.disabled = true; 97 + command_timeout = 1000; 98 + hostname = { 99 + ssh_only = true; 100 + format = "[$hostname]($style) "; 101 + }; 102 + cmd_duration.min_time = 2000; 103 + }; 104 + }; 105 + 106 + xdg.configFile."starship-jj/starship-jj.toml".text = '' 107 + module_separator = " " 108 + reset_color = false 109 + 110 + [[module]] 111 + type = "Bookmarks" 112 + separator = " " 113 + color = "Magenta" 114 + behind_symbol = "⇡" 115 + surround_with_quotes = false 116 + 117 + [[module]] 118 + type = "Commit" 119 + previous_message_symbol = "⇣" 120 + max_length = 24 121 + show_previous_if_empty = false 122 + empty_text = "" 123 + surround_with_quotes = false 124 + color = "Cyan" 125 + 126 + [module.non_unique] 127 + color = "Black" 128 + 129 + [[module]] 130 + type = "State" 131 + separator = " " 132 + 133 + [module.conflict] 134 + disabled = false 135 + text = "󰀨" 136 + color = "Red" 137 + 138 + [module.divergent] 139 + disabled = false 140 + text = "󰃻" 141 + color = "Cyan" 142 + 143 + [module.empty] 144 + disabled = true 145 + text = "󰟢" 146 + color = "Yellow" 147 + 148 + [module.immutable] 149 + disabled = false 150 + text = "󰌾" 151 + color = "Yellow" 152 + 153 + [module.hidden] 154 + disabled = false 155 + text = "󰈈" 156 + color = "Yellow" 157 + 158 + [[module]] 159 + type = "Metrics" 160 + template = "[{changed} {added}{removed}]" 161 + hide_if_empty = true 162 + color = "Magenta" 163 + 164 + [module.changed_files] 165 + prefix = "" 166 + suffix = "" 167 + color = "Cyan" 168 + 169 + [module.added_lines] 170 + prefix = "+" 171 + suffix = "" 172 + color = "Green" 173 + 174 + [module.removed_lines] 175 + prefix = "-" 176 + suffix = "" 177 + color = "Red" 178 + ''; 69 179 70 180 programs.fzf = { 71 181 enable = true;