kube-tmux is not in nixpkgs, so add the upstream repo as a flake = false
input and reference ${inputs.kube-tmux}/kube.tmux directly. The script is now
always in the store, so the previous $HOME/code/kube-tmux existence guard is
removed and the tmux status line no longer depends on a manual checkout.
Refs #50
This commit is contained in:
Generated
+17
@@ -191,6 +191,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kube-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1779714285,
|
||||
"narHash": "sha256-l1wjg2ReWKCI7h/K11vvX2ykYTs/mVD+tfz/mQsjn/E=",
|
||||
"owner": "jonmosco",
|
||||
"repo": "kube-tmux",
|
||||
"rev": "8b7e1d127c16b6dc87ff5743f4d775b245198b69",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jonmosco",
|
||||
"repo": "kube-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -373,6 +389,7 @@
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager",
|
||||
"kube-tmux": "kube-tmux",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nix-index-database": "nix-index-database",
|
||||
|
||||
@@ -60,6 +60,13 @@
|
||||
url = "github:NixOS/nixos-hardware";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# kube-tmux: kube context/namespace for the tmux status line on the work
|
||||
# host. Not in nixpkgs and not a flake -- pinned here as a plain source so
|
||||
# the script is always in the store (no manual checkout). See work.nix.
|
||||
kube-tmux = {
|
||||
url = "github:jonmosco/kube-tmux";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# Work (EDaaS/WSL) home profile: corporate toolchain + tmux tweaks. Git identity
|
||||
# comes from the registry (users/registry.nix), not here.
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Host-scoped extras for this machine only (the EDaaS/WSL host).
|
||||
@@ -47,10 +52,10 @@
|
||||
docker = "/run/current-system/sw/bin/docker";
|
||||
};
|
||||
programs.tmux = {
|
||||
# kube-tmux is an external checkout; guard on its presence so the status
|
||||
# line degrades gracefully (no per-refresh error) when it isn't cloned.
|
||||
# kube context/namespace in the status line. kube-tmux is pinned as a flake
|
||||
# input (it is not in nixpkgs), so the script is always present in the store.
|
||||
extraConfig = ''
|
||||
set -g status-right "#(if [ -f $HOME/code/kube-tmux/kube.tmux ]; then /run/current-system/sw/bin/bash $HOME/code/kube-tmux/kube.tmux 250 red black; fi)"
|
||||
set -g status-right "#(${pkgs.bash}/bin/bash ${inputs.kube-tmux}/kube.tmux 250 red black)"
|
||||
'';
|
||||
};
|
||||
programs.go = {
|
||||
|
||||
Reference in New Issue
Block a user