nix/home/program/bash/module/Tmp.nix

22 lines
350 B
Nix
Raw Normal View History

{ ... }:
{
text = ''
# CD into host's primary tmp dir.
function tmp() {
local host="''${HOSTNAME}"
local tmp_path
2024-04-06 03:03:58 +03:00
case "''${host}" in
"desktop"|"home")
tmp_path="/storage/hot/tmp"
;;
*)
tmp_path="''${HOME}/tmp"
;;
esac
2024-04-06 03:03:58 +03:00
cd "''${tmp_path}"
}
'';
2024-04-06 03:03:58 +03:00
}