diff --git a/nix/overlay.nix b/nix/overlay.nix index 5e4649a..2f20583 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -82,18 +82,18 @@ in { test -S "$SSH_AUTH_SOCK" && ssh="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK" tty -s && tty="-t" || quiet="-q" + # define these as variables so we can override them at runtime POSH_IMAGE=${image} POSH_PULL=${pull} if [ "$1" == "-c" ]; then - # we've most likely been spawned by sshd - # $2 contains the command string + # We've most likely been spawned by sshd and are interested in $2 whitch contains the command string shift - # TODO: make the variables overridable via the command_string + # TODO parse the beginning of the command for POSH_* overrides fi exec ${self.podman}/bin/podman \ - ${global_args} run --rm -i $tty $ssh -v ~/:/root -w /root --pull=always --network host --pull=''${POSH_PULL} \ + ${global_args} run --rm -i $tty $ssh -v ~/:/root -w /root --network host --pull=''${POSH_PULL} \ ${run_args} ''${POSH_IMAGE} $@ '') .overrideAttrs(attrs: attrs // {