feat(shell): Add ts-status alias
Probably in the future this should be a replacement wrapper that
auto-tabulates `tailscale status`, but for now it was far easier to just
write this as a separate alias
Change-Id: Idbea7331ac0d00ecb134eaab027ea9f4f7df68d3
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/773
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix
index 4a0b8cb..c6ad0d8 100644
--- a/modules/home/shell/default.nix
+++ b/modules/home/shell/default.nix
@@ -13,6 +13,9 @@
};
defaultAliases.enable = lib.mkEnableOption "Use sensible custom aliases";
usefulPackages.enable = lib.mkEnableOption "Enable useful shell packages (ripgrep, wget, etc)";
+
+ tsStatus.enable = lib.mkEnableOption "Enable ts-status alias for better viewing of tailscale status.";
+
replacements = {
defaultEnable = lib.mkEnableOption "Enable replacing everything by default";
@@ -110,6 +113,8 @@
du = lib.mkIf config.chimera.shell.replacements.dust.enable "${pkgs.dust}/bin/dust";
cat = lib.mkIf any_cat_replacement glow_or_cat_or_bat;
lix = "${config.nix.package}/bin/nix"; # Lix, like nix
+
+ ts-status = lib.mkIf config.chimera.shell.tsStatus.enable ''${pkgs.tailscale}/bin/tailscale status | column -t -N "ADDRESS,DOMAIN,USER,OS,STATUS,CONNECTION" -l 6 -o " | "'';
});
home.sessionVariables = lib.mkIf (config.chimera.shell.usefulPackages.enable && config.chimera.theme.style == "Light") {
diff --git a/modules/home/users/minion/default.nix b/modules/home/users/minion/default.nix
index d84ed24..4ec136d 100644
--- a/modules/home/users/minion/default.nix
+++ b/modules/home/users/minion/default.nix
@@ -142,6 +142,7 @@
};
chimera.shell = {
+ tsStatus.enable = true;
bash.enable = true;
defaultAliases.enable = true;
replacements.defaultEnable = true;