add jj-starship and fix zellij lockout

This commit is contained in:
Noah Masur
2026-02-26 09:46:53 -05:00
parent 84bffd13e8
commit 9a97d94ffa
5 changed files with 86 additions and 12 deletions

73
flake.lock generated
View File

@@ -4,7 +4,7 @@
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"systems": "systems",
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@@ -135,6 +135,24 @@
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": [
"mac-app-util",
@@ -154,9 +172,9 @@
"type": "indirect"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@@ -193,13 +211,34 @@
"type": "github"
}
},
"jj-starship": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1769370163,
"narHash": "sha256-YfcFlJsPCRfqhN+3JUWE77c+eHIp5RAu2rq/JhSxCec=",
"owner": "dmmulroy",
"repo": "jj-starship",
"rev": "76cf00619b0cce5bd08a1b9a49b310ed928794d5",
"type": "github"
},
"original": {
"owner": "dmmulroy",
"repo": "jj-starship",
"type": "github"
}
},
"mac-app-util": {
"inputs": {
"cl-nix-lite": "cl-nix-lite",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3",
"systems": "systems_2",
"systems": "systems_3",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
@@ -218,7 +257,7 @@
},
"nix2vim": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
@@ -426,6 +465,7 @@
"darwin": "darwin",
"disko": "disko",
"home-manager": "home-manager",
"jj-starship": "jj-starship",
"mac-app-util": "mac-app-util",
"nix2vim": "nix2vim",
"nixos-generators": "nixos-generators",
@@ -472,6 +512,21 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1689347925,
"narHash": "sha256-ozenz5bFe1UUqOn7f60HRmgc01BgTGIKZ4Xl+HbocGQ=",
@@ -486,7 +541,7 @@
"type": "github"
}
},
"systems_3": {
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -501,7 +556,7 @@
"type": "github"
}
},
"systems_4": {
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -581,7 +636,7 @@
"rust-overlay": [
"rust-overlay"
],
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1742588229,

View File

@@ -75,6 +75,11 @@
inputs.rust-overlay.follows = "rust-overlay";
};
jj-starship = {
url = "github:dmmulroy/jj-starship";
inputs.nixpkgs.follows = "nixpkgs";
};
# # Text editor
# helix = {
# url = "github:helix-editor/helix";

View File

@@ -67,6 +67,7 @@ lib
inputs.nur.overlays.default
inputs.nix2vim.overlay
inputs.zellij-switch.overlays.default
inputs.jj-starship.overlays.default
# inputs.helix.overlays.default
]
++ (importOverlays ../overlays);

View File

@@ -15,6 +15,8 @@ in
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.jj-starship ];
programs.starship = {
enable = true;
enableFishIntegration = true;
@@ -27,6 +29,7 @@ in
"$git_branch"
"$git_commit"
"$git_status"
"\${custom.jj}"
"$hostname"
"$cmd_duration"
"$character"
@@ -38,23 +41,33 @@ in
vicmd_symbol = "[](bold green)";
};
cmd_duration = {
min_time = 5000;
min_time = 5001;
show_notifications = if pkgs.stdenv.isLinux then false else true;
min_time_to_notify = 30000;
format = "[$duration]($style) ";
};
custom = {
jj = {
when = "jj-starship detect";
shell = [ "jj-starship" ];
format = "$output ";
};
};
directory = {
truncate_to_repo = true;
truncation_length = 100;
};
git_branch = {
disabled = true;
format = "[$symbol$branch]($style)";
};
git_commit = {
disabled = true;
format = "( @ [$hash]($style) )";
only_detached = false;
};
git_status = {
disabled = true;
format = "([$all_status$ahead_behind]($style) )";
conflicted = "=";
ahead = "";

View File

@@ -101,7 +101,7 @@ in
show_startup_tips = false;
keybinds = {
locked = {
locked = lib.mkIf (pkgs.stdenv.isLinux && !config.programs.ghostty.enable) {
# For servers that I SSH into, use c-a-G to unlock
"bind \"Ctrl Alt G\"" = lib.mkIf (pkgs.stdenv.isLinux && !config.programs.ghostty.enable) {
SwitchToMode = {
@@ -109,7 +109,7 @@ in
};
};
};
normal = {
normal = lib.mkIf (pkgs.stdenv.isLinux && !config.programs.ghostty.enable) {
# For servers that I SSH into, use c-a-G to lock
"bind \"Ctrl Alt G\"" = lib.mkIf (pkgs.stdenv.isLinux && !config.programs.ghostty.enable) {
SwitchToMode = {