nix all the things

starship: try jj-starship instead of starship-jj

karitham.dev 17fe49b0 83a144dc

verified
+30 -212
+19 -132
flake.lock
··· 50 50 "type": "github" 51 51 } 52 52 }, 53 - "fenix": { 54 - "inputs": { 55 - "nixpkgs": [ 56 - "starship-jj", 57 - "nixpkgs" 58 - ], 59 - "rust-analyzer-src": "rust-analyzer-src" 60 - }, 61 - "locked": { 62 - "lastModified": 1768113825, 63 - "narHash": "sha256-f09fAifGPEuRrz1DFY910jexq0DaBuQBbq7WcxQIUgs=", 64 - "owner": "nix-community", 65 - "repo": "fenix", 66 - "rev": "55106e04d905c6a7726d0f6be77ed39a99f66a61", 67 - "type": "github" 68 - }, 69 - "original": { 70 - "owner": "nix-community", 71 - "repo": "fenix", 72 - "type": "github" 73 - } 74 - }, 75 53 "flake-compat": { 76 54 "flake": false, 77 55 "locked": { ··· 124 102 "type": "github" 125 103 } 126 104 }, 127 - "flake-utils": { 128 - "inputs": { 129 - "systems": [ 130 - "starship-jj", 131 - "systems" 132 - ] 133 - }, 134 - "locked": { 135 - "lastModified": 1731533236, 136 - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 137 - "owner": "numtide", 138 - "repo": "flake-utils", 139 - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 140 - "type": "github" 141 - }, 142 - "original": { 143 - "owner": "numtide", 144 - "repo": "flake-utils", 145 - "type": "github" 146 - } 147 - }, 148 105 "ghostty": { 149 106 "inputs": { 150 107 "flake-compat": "flake-compat", ··· 154 111 "zon2nix": "zon2nix" 155 112 }, 156 113 "locked": { 157 - "lastModified": 1773642602, 158 - "narHash": "sha256-WX66DS0cs6sRutHhJqSGYHrffpszsgmJsl+O7kl4Hjs=", 114 + "lastModified": 1773684397, 115 + "narHash": "sha256-ZrK7IhL7VjR2iwWbAAalieM+ZlDxWjdncxkjaMSzuvQ=", 159 116 "owner": "ghostty-org", 160 117 "repo": "ghostty", 161 - "rev": "600f59ae313adf377c0bf0d754fa258257f5f65f", 118 + "rev": "2318e18df3577151f8c1fd130bd6b698e8ffde21", 162 119 "type": "github" 163 120 }, 164 121 "original": { ··· 217 174 ] 218 175 }, 219 176 "locked": { 220 - "lastModified": 1773608492, 221 - "narHash": "sha256-QZteyExJYSQzgxqdsesDPbQgjctGG7iKV/6ooyQPITk=", 177 + "lastModified": 1773681856, 178 + "narHash": "sha256-+bRqxoFCJFO9ZTFhcCkzNXbDT3b8AEk88fyjB7Is6eo=", 222 179 "owner": "nix-community", 223 180 "repo": "home-manager", 224 - "rev": "9a40ec3b78fc688d0908485887d355caa5666d18", 181 + "rev": "57d5560ee92a424fb71fde800acd6ed2c725dfce", 225 182 "type": "github" 226 183 }, 227 184 "original": { ··· 283 240 "xwayland-satellite-unstable": "xwayland-satellite-unstable" 284 241 }, 285 242 "locked": { 286 - "lastModified": 1773646853, 287 - "narHash": "sha256-9xzEP9ExGPYOg9Oa4CCQo3kGCwxVQ9oSjmB897XWiF0=", 243 + "lastModified": 1773675540, 244 + "narHash": "sha256-P4S7I15rxuJ+Iq7F4Z1OrMAcZaJEiIasYNioiJjc4/s=", 288 245 "owner": "sodiboo", 289 246 "repo": "niri-flake", 290 - "rev": "7b3fd75b0a117bc247cb5183ed22cf7d5e3e135a", 247 + "rev": "9061fa226d41fceec5bcec72e0e7ee2282b5645e", 291 248 "type": "github" 292 249 }, 293 250 "original": { ··· 366 323 }, 367 324 "nixpkgs-stable": { 368 325 "locked": { 369 - "lastModified": 1773524153, 370 - "narHash": "sha256-Jms57zzlFf64ayKzzBWSE2SGvJmK+NGt8Gli71d9kmY=", 326 + "lastModified": 1773610124, 327 + "narHash": "sha256-EpC7ELOKmb+xXaqpK5ZRpJ5g9fxxg6tWny7/rUBfrwk=", 371 328 "owner": "NixOS", 372 329 "repo": "nixpkgs", 373 - "rev": "e9f278faa1d0c2fc835bd331d4666b59b505a410", 330 + "rev": "9fe1300f4360e13f39d6d1d006e54fd5093e9ad5", 374 331 "type": "github" 375 332 }, 376 333 "original": { ··· 382 339 }, 383 340 "nixpkgs_2": { 384 341 "locked": { 385 - "lastModified": 1773579282, 386 - "narHash": "sha256-LWvZj9Bvm1EuoO6zbX4yjZebwnZNfeTbmCJGS7RGQ3Y=", 342 + "lastModified": 1773646010, 343 + "narHash": "sha256-iYrs97hS7p5u4lQzuNWzuALGIOdkPXvjz7bviiBjUu8=", 387 344 "owner": "NixOS", 388 345 "repo": "nixpkgs", 389 - "rev": "5a88de74db0e948139be4b46f9a94d64aa11391c", 346 + "rev": "5b2c2d84341b2afb5647081c1386a80d7a8d8605", 390 347 "type": "github" 391 348 }, 392 349 "original": { ··· 425 382 "type": "github" 426 383 } 427 384 }, 428 - "nixpkgs_5": { 429 - "locked": { 430 - "lastModified": 1767892417, 431 - "narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=", 432 - "owner": "nixos", 433 - "repo": "nixpkgs", 434 - "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", 435 - "type": "github" 436 - }, 437 - "original": { 438 - "owner": "nixos", 439 - "ref": "nixos-unstable", 440 - "repo": "nixpkgs", 441 - "type": "github" 442 - } 443 - }, 444 385 "noctalia": { 445 386 "inputs": { 446 387 "nixpkgs": [ ··· 449 390 "noctalia-qs": "noctalia-qs" 450 391 }, 451 392 "locked": { 452 - "lastModified": 1773628930, 453 - "narHash": "sha256-30B1aEHVLdrsiGZOj8X2riKhb7i6p92+DTTNNdWMJsg=", 393 + "lastModified": 1773670009, 394 + "narHash": "sha256-LEiA7ntxR6Biep4fgD2Jh9bB1g2olRNAToFUS51szDs=", 454 395 "owner": "noctalia-dev", 455 396 "repo": "noctalia-shell", 456 - "rev": "1b2ec2e4a289bf71dc48b95d3c2ba04a8b50a717", 397 + "rev": "9511f1fce45ffe763d7954f3207e3dfd644c97f2", 457 398 "type": "github" 458 399 }, 459 400 "original": { ··· 522 463 "nixpkgs": "nixpkgs_3", 523 464 "noctalia": "noctalia", 524 465 "sops-nix": "sops-nix", 525 - "ssh-keys": "ssh-keys", 526 - "starship-jj": "starship-jj" 527 - } 528 - }, 529 - "rust-analyzer-src": { 530 - "flake": false, 531 - "locked": { 532 - "lastModified": 1768083390, 533 - "narHash": "sha256-TGWPJq2mXwxfAe83iZ18DIqXC4sOSj7RkW9b59h6Ox4=", 534 - "owner": "rust-lang", 535 - "repo": "rust-analyzer", 536 - "rev": "e42e8ff582ba12a88b6845525d08b6428e6d0fb9", 537 - "type": "github" 538 - }, 539 - "original": { 540 - "owner": "rust-lang", 541 - "ref": "nightly", 542 - "repo": "rust-analyzer", 543 - "type": "github" 466 + "ssh-keys": "ssh-keys" 544 467 } 545 468 }, 546 469 "rust-overlay": { ··· 596 519 "url": "https://github.com/karitham.keys" 597 520 } 598 521 }, 599 - "starship-jj": { 600 - "inputs": { 601 - "fenix": "fenix", 602 - "flake-utils": "flake-utils", 603 - "nixpkgs": "nixpkgs_5", 604 - "systems": "systems_3" 605 - }, 606 - "locked": { 607 - "lastModified": 1771062192, 608 - "narHash": "sha256-gOGLVeKtoWJrcaESPfULDnohntqBe+hzBhvDiF935Cs=", 609 - "owner": "lanastara_foss", 610 - "repo": "starship-jj", 611 - "rev": "e2fe1544fe92198427a1fcc1dfad9dbccf93ce79", 612 - "type": "gitlab" 613 - }, 614 - "original": { 615 - "owner": "lanastara_foss", 616 - "repo": "starship-jj", 617 - "type": "gitlab" 618 - } 619 - }, 620 522 "systems": { 621 523 "flake": false, 622 524 "locked": { ··· 645 547 "original": { 646 548 "owner": "nix-systems", 647 549 "repo": "default-linux", 648 - "type": "github" 649 - } 650 - }, 651 - "systems_3": { 652 - "locked": { 653 - "lastModified": 1681028828, 654 - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 655 - "owner": "nix-systems", 656 - "repo": "default", 657 - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 658 - "type": "github" 659 - }, 660 - "original": { 661 - "owner": "nix-systems", 662 - "repo": "default", 663 550 "type": "github" 664 551 } 665 552 },
-1
flake.nix
··· 41 41 url = "github:noctalia-dev/noctalia-shell"; 42 42 inputs.nixpkgs.follows = "nixpkgs"; 43 43 }; 44 - starship-jj.url = "gitlab:lanastara_foss/starship-jj"; 45 44 ssh-keys = { 46 45 url = "https://github.com/karitham.keys"; 47 46 flake = false;
+11 -79
modules/dev/shell/starship.nix
··· 1 1 { 2 2 config, 3 - inputs', 3 + pkgs, 4 4 lib, 5 5 ... 6 6 }: 7 7 { 8 8 config = lib.mkIf config.dev.shell.enable { 9 - xdg.configFile."starship-jj/starship-jj.toml".text = '' 10 - "$schema"="https://gitlab.com/Lanastara/lanastara_foss/-/raw/v0.3.0/schema.json?ref_type=tags" 11 - module_separator = " " 12 - timeout = 1000 13 - [bookmarks] 14 - search_depth = 100 15 - exclude = [] 16 - 17 - [[module]] 18 - type = "Commit" 19 - empty_text = "" 20 - [module.change] 21 - fg = "magenta" 22 - 23 - [[module]] 24 - type = "Bookmarks" 25 - separator = " " 26 - color = "Magenta" 27 - behind_symbol = "⇡" 28 - 29 - [[module]] 30 - type = "State" 31 - separator = " " 32 - 33 - [module.conflict] 34 - disabled = true 35 - text = "(CONFLICT)" 36 - color = "Red" 37 - 38 - [module.divergent] 39 - disabled = true 40 - text = "(DIVERGENT)" 41 - color = "Cyan" 42 - 43 - [module.empty] 44 - disabled = false 45 - text = "(EMPTY)" 46 - color = "Yellow" 47 - 48 - [module.immutable] 49 - disabled = false 50 - text = "(IMMUTABLE)" 51 - color = "Yellow" 52 - 53 - [module.hidden] 54 - disabled = false 55 - text = "(HIDDEN)" 56 - color = "Yellow" 57 - 58 - [[module]] 59 - type = "Metrics" 60 - template = "[{changed} {added}{removed}]" 61 - color = "Magenta" 62 - 63 - [module.changed_files] 64 - prefix = "" 65 - suffix = "" 66 - color = "Cyan" 67 - 68 - [module.added_lines] 69 - prefix = "+" 70 - suffix = "" 71 - color = "Green" 72 - 73 - [module.removed_lines] 74 - prefix = "-" 75 - suffix = "" 76 - color = "Red" 77 - ''; 9 + home.packages = [ pkgs.jj-starship ]; 78 10 programs.starship = { 79 11 enable = true; 80 12 settings = { ··· 91 23 }; 92 24 custom = { 93 25 jj = { 94 - command = "${lib.getExe' inputs'.starship-jj.packages.default "starship-jj"} --ignore-working-copy starship prompt"; 95 - format = "[$symbol](blue bold) $output"; 96 - symbol = "󱗆"; 97 - when = "jj root --ignore-working-copy"; 98 - }; 99 - git_branch = { 100 - when = true; 101 - command = "jj root >/dev/null 2>&1 || starship module git_branch"; 102 - description = "Only show git_branch if we're not in a jj repo"; 26 + when = "jj-starship detect"; 27 + shell = [ "jj-starship" ]; 28 + format = "$output "; 103 29 }; 30 + }; 31 + git_branch = { 32 + disabled = true; 33 + }; 34 + git_status = { 35 + disabled = true; 104 36 }; 105 37 }; 106 38 };