Compare commits

..

No commits in common. "71cff1d700607f5eb6971f0ac29fbc32766bada8" and "cbe8d0dcb224d910ca4b1b891114641e04ae2665" have entirely different histories.

6 changed files with 13 additions and 94 deletions

View File

@ -48,7 +48,6 @@ in {
];
programs = {
zoxide.enable = true;
firejail.enable = true;
virt-manager.enable = true;
nix-ld = {

View File

@ -70,13 +70,6 @@ in {
sqlite
cronie
editorconfig-core-c
(writeShellScriptBin "rhelmot-footclient" ''
#!/bin/sh
if [ -n "''${RHELMOT_FOOTSOCK:-}" ] && [ -S "''${RHELMOT_FOOTSOCK}" ]; then
exec footclient --server-socket="''${RHELMOT_FOOTSOCK}" "$@"
fi
exec footclient "$@"
'')
(python3.withPackages (p: lib.concatMap (pl: pl p) rhelmot.globalPythonPackages))
];
@ -138,7 +131,6 @@ in {
enable = true;
extraConfig = builtins.readFile ./dotfiles/tmux.conf;
};
ssh.extraConfig = builtins.readFile ./dotfiles/ssh-config;
direnv.enable = true;
htop.enable = true;
git = {
@ -175,16 +167,10 @@ in {
environment.etc."gdb/gdbinit".source = ./dotfiles/gdb-init.gdb;
environment.etc."venv-default.txt".source = ./dotfiles/venv-default.txt;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# uh oh...
services.openssh.settings.AcceptEnv = "RHELMOT_SWAYSOCK RHELMOT_FOOTSOCK RHELMOT_REMOTE_SWAYSOCK RHELMOT_REMOTE_FOOTSOCK";
environment.sessionVariables = {
RHELMOT_SWAYSOCK = "/dev/null";
RHELMOT_FOOTSOCK = "/dev/null";
RHELMOT_REMOTE_SWAYSOCK = "/tmp/rhelmot-disabled-sway.sock";
RHELMOT_REMOTE_FOOTSOCK = "/tmp/rhelmot-disabled-foot.sock";
};
services.sanoid = lib.mkIf config.boot.zfs.enabled {
enable = true;
datasets."system/home" = {
@ -245,3 +231,4 @@ in {
};
};
}

View File

@ -26,7 +26,7 @@ define-command -docstring "terminal but floating" terminal-floating -params .. %
set-option global fzf_terminal_command 'terminal-floating'
define-command sway-terminal-floating -params .. %{
nop %sh{ sway fullscreen disable }
set-option local termcmd "rhelmot-footclient --title=fzf.kak.picker sh -c"
set-option local termcmd "footclient --title=fzf.kak.picker sh -c"
wayland-terminal-window %arg{@}
}

View File

@ -1,10 +0,0 @@
Match tagged trusted
SendEnv RHELMOT_SWAYSOCK RHELMOT_FOOTSOCK RHELMOT_REMOTE_SWAYSOCK RHELMOT_REMOTE_FOOTSOCK
StreamLocalBindUnlink yes
ExitOnForwardFailure no
Match tagged trusted exec "test -S \"${RHELMOT_SWAYSOCK}\" && test -n \"${RHELMOT_REMOTE_SWAYSOCK}\""
RemoteForward ${RHELMOT_REMOTE_SWAYSOCK} ${RHELMOT_SWAYSOCK}
Match tagged trusted exec "test -S \"${RHELMOT_FOOTSOCK}\" && test -n \"${RHELMOT_REMOTE_FOOTSOCK}\""
RemoteForward ${RHELMOT_REMOTE_FOOTSOCK} ${RHELMOT_FOOTSOCK}

View File

@ -162,63 +162,6 @@ export npm_config_prefix=~/.local
export HISTSIZE=100000
export SAVEHIST=100000
# Initialize SSH-forwarding variables so ssh_config env expansions remain valid.
: ${RHELMOT_SWAYSOCK:=/dev/null}
: ${RHELMOT_FOOTSOCK:=/dev/null}
: ${RHELMOT_REMOTE_SWAYSOCK:=/tmp/rhelmot-disabled-sway.sock}
: ${RHELMOT_REMOTE_FOOTSOCK:=/tmp/rhelmot-disabled-foot.sock}
# If remote socket forwards are present, opt in to them; otherwise leave local workflow unchanged.
if [[ -n "$RHELMOT_REMOTE_SWAYSOCK" && -S "$RHELMOT_REMOTE_SWAYSOCK" ]]; then
export SWAYSOCK="$RHELMOT_REMOTE_SWAYSOCK"
fi
if [[ -n "$RHELMOT_REMOTE_FOOTSOCK" && -S "$RHELMOT_REMOTE_FOOTSOCK" ]]; then
export RHELMOT_FOOTSOCK="$RHELMOT_REMOTE_FOOTSOCK"
fi
function _rhelmot_ssh_with_remote_ui_forwarding() {
local local_sway local_foot
local_sway="${SWAYSOCK:-$RHELMOT_SWAYSOCK}"
local_foot="$RHELMOT_FOOTSOCK"
if [[ -z "$local_foot" ]]; then
for candidate in \
"${XDG_RUNTIME_DIR:-}/foot-${WAYLAND_DISPLAY:-}.sock" \
"${XDG_RUNTIME_DIR:-}/foot.sock" \
"/tmp/foot.sock"; do
if [[ -S "$candidate" ]]; then
local_foot="$candidate"
break
fi
done
fi
[[ -S "$local_sway" ]] || local_sway="/dev/null"
[[ -S "$local_foot" ]] || local_foot="/dev/null"
if [[ "$local_sway" == "/dev/null" && "$local_foot" == "/dev/null" ]]; then
command ssh "$@"
return
fi
mkdir -p -m 700 "$HOME/.ssh"
local nonce remote_sway remote_foot
nonce="$(date +%s)-$$-$RANDOM"
remote_sway="$HOME/.ssh/rhelmot-sway-$nonce.sock"
remote_foot="$HOME/.ssh/rhelmot-foot-$nonce.sock"
env \
RHELMOT_SWAYSOCK="$local_sway" \
RHELMOT_FOOTSOCK="$local_foot" \
RHELMOT_REMOTE_SWAYSOCK="$remote_sway" \
RHELMOT_REMOTE_FOOTSOCK="$remote_foot" \
command ssh -P rhelmot-kak-remote-forward-request "$@"
}
function ssh() {
_rhelmot_ssh_with_remote_ui_forwarding "$@"
}
# site vars, functions, and aliases
if [ -e ~/.site_aliases.sh ]; then
source ~/.site_aliases.sh

View File

@ -13,7 +13,7 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "clove/tier1/root";
{ device = "system/tier1/root";
fsType = "zfs";
};
@ -24,42 +24,42 @@
};
fileSystems."/var" =
{ device = "clove/tier1/var";
{ device = "system/tier1/var";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "clove/tier1/home";
{ device = "system/tier1/home";
fsType = "zfs";
};
fileSystems."/var/lib/containers" =
{ device = "clove/tier2/containers";
{ device = "system/tier2/containers";
fsType = "zfs";
};
fileSystems."/var/log" =
{ device = "clove/tier2/log";
{ device = "system/tier2/log";
fsType = "zfs";
};
fileSystems."/var/spool" =
{ device = "clove/tier2/spool";
{ device = "system/tier2/spool";
fsType = "zfs";
};
fileSystems."/var/tmp" =
{ device = "clove/scratch/tmp";
{ device = "system/scratch/tmp";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "clove/scratch/nix";
{ device = "system/scratch/nix";
fsType = "zfs";
};
fileSystems."/var/cache" =
{ device = "clove/scratch/cache";
{ device = "system/scratch/cache";
fsType = "zfs";
};