mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Mac improvmenets
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, lib, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./nix/nix.nix
|
./nix/nix.nix
|
||||||
];
|
];
|
||||||
@@ -40,4 +40,22 @@
|
|||||||
StandardErrorPath = "/tmp/caffeinate.err";
|
StandardErrorPath = "/tmp/caffeinate.err";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
launchd.user.agents.ssh-tunnel = let
|
||||||
|
ssh-tunnel = pkgs.writeShellScriptBin "ssh-tunnel" ''
|
||||||
|
while true; do
|
||||||
|
dns-sd -m -Q fuhen.local
|
||||||
|
ssh -NR "2222:localhost:22" zoriya@fuhen.local
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
command = lib.getExe ssh-tunnel;
|
||||||
|
serviceConfig = {
|
||||||
|
KeepAlive = true;
|
||||||
|
RunAtLoad = true;
|
||||||
|
StandardOutPath = "/tmp/ssh-tunnel.log";
|
||||||
|
StandardErrorPath = "/tmp/ssh-tunnel.err";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,8 +56,9 @@
|
|||||||
|
|
||||||
# suspend inner tmux (to allow nested sessions)
|
# suspend inner tmux (to allow nested sessions)
|
||||||
bind @ { set prefix None; set key-table off }
|
bind @ { set prefix None; set key-table off }
|
||||||
# NOTE: C-@ doesn't work since v3.5a
|
# NOTE: C-@ doesn't work since v3.5a (since tmux doesn't support kitty keyboard protocol)
|
||||||
bind -T off C-@ { set -u prefix; set -u key-table }
|
# Instead, C-@ and C-Space does the same thing.
|
||||||
|
bind -T off C-Space { set -u prefix; set -u key-table }
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,10 @@
|
|||||||
dr = "direnv reload";
|
dr = "direnv reload";
|
||||||
nixos-option = "nixos-option --flake ~/projects/flake";
|
nixos-option = "nixos-option --flake ~/projects/flake";
|
||||||
# i will never remember those flags
|
# i will never remember those flags
|
||||||
ss = "ss -tlpun";
|
ss =
|
||||||
|
if pkgs.stdenv.isLinux
|
||||||
|
then "ss -tlpun"
|
||||||
|
else "netstat -anvp tcp | awk 'NR<3 || /LISTEN/'";
|
||||||
# habits
|
# habits
|
||||||
copyfile = "clipcopy";
|
copyfile = "clipcopy";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user