diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.nix | 30 | ||||
-rw-r--r-- | lib/ssh.nix | 62 |
2 files changed, 18 insertions, 74 deletions
diff --git a/lib/common.nix b/lib/common.nix index 325810f..94cf1aa 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -144,9 +144,6 @@ in { # emacs-like history navigation "\\en" = "next-history"; "\\ep" = "previous-history"; - # groq-specific stuff - "\\er" = "redraw-current-line"; - "\\C-xt" = ''"$(_bake_targets)\e\C-e\er"''; }; extraConfig = '' $if Guile @@ -228,6 +225,7 @@ in { authors = "shortlog -s -n"; slog = "log --stat"; glog = ''log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; + last = "log -1 HEAD"; logbr = "log -r origin/HEAD..HEAD"; mylog = ''!git log --author=$USER --decorate --pretty=format:"%Cred%h%Creset %s%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; mrd = "!cat <(git shortlog origin/HEAD..HEAD) <(git diff --stat origin/HEAD...HEAD)"; @@ -236,12 +234,12 @@ in { "!git push" "-o merge_request.create" "-o merge_request.merge_when_pipeline_succeeds" - "-o merge_request.label=ReleaseUpdate::NotRequired" "-o merge_request.assign=$USER" # disable these two args bc gitlab just uses the commit message anyway # ''-o merge_request.title="$(git log -n1 --format=%s)"'' # ''-o merge_request.description="$(git log -n --format=%b)"'' ]; + unstage = "reset HEAD --"; }; extraConfig = { commit.template = "${./git-commit-template}"; @@ -277,10 +275,11 @@ in { clock24 = true; customPaneNavigationAndResize = false; disableConfirmationPrompt = false; - escapeTime = 0; + escapeTime = 100; historyLimit = 10000; keyMode = "emacs"; - newSession = false; + mouse = true; + newSession = true; resizeAmount = 5; reverseSplit = false; secureSocket = false; @@ -290,12 +289,15 @@ in { terminal = "xterm-256color"; tmuxinator.enable = false; tmuxp.enable = false; + plugins = with pkgs.tmuxPlugins; [ + extrakto + tmux-fzf + ]; extraConfig = '' # Automatically set window title set-window-option -g automatic-rename on set-option -g set-titles on set -g xterm-keys on - setw -g mouse on ## Panes # Split panes bind-key | split-window -h -c "#{pane_current_path}" @@ -343,13 +345,9 @@ in { set -g window-status-current-style fg=colour0,bg=colour13 set -g window-status-format '#I) #W ' set -g window-status-current-format '#I) #W ' - # special thing for groq's SFT thing - set -g update-environment "SFT_AUTH_SOCK SSH_AUTH_SOCK SSH_CONNECTION" + # + set-option -g allow-passthrough on ''; - plugins = with pkgs.tmuxPlugins; [ - extrakto - tmux-fzf - ]; }; programs.direnv = { @@ -412,9 +410,9 @@ in { bash = { enable = true; - #profileExtra = '' - # # put SSH_AUTH_SOCK here? - #''; + profileExtra = '' + # put SSH_AUTH_SOCK here? + ''; initExtra = '' #DIR=~/.nix-profile/etc/profile.d #[[ -f "$DIR/nix.sh" ]] && . "$DIR/nix.sh" diff --git a/lib/ssh.nix b/lib/ssh.nix index 013e727..6446a63 100644 --- a/lib/ssh.nix +++ b/lib/ssh.nix @@ -7,68 +7,14 @@ in { controlMaster = "auto"; enable = true; forwardAgent = true; - extraConfig = '' - # this never works, i just get a warning when i ssh - # RemoteForward %d/.gnupg/S.gpg-agent ''${HOME}/.gnupg/S.gpg-agent.extra - ''; matchBlocks = { - # groq - "bsima" = { - hostname = "bsima"; # must be on vpn - user = "bsima"; - identityFile = [ "${homedir}/.ssh/groq" ]; - identitiesOnly = true; - forwardAgent = true; + "beryllium" = { + hostname = "beryllium"; extraOptions = { - #"RemoteCommand" = "tmux -CC new -As0"; - "RequestTTY" = "force"; + "RemoteForward" = "/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra"; + "StreamLocalBindUnlink" = "yes"; }; }; - - # simatime - "sabten" = { - hostname = "142.93.81.26"; - user = "root"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - "serval.simatime.com" = { - hostname = "serval.simatime.com"; - user = "ben"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - #"simatime.com" = { - # hostname = "simatime.com"; - # user = "git"; - # identitiesOnly = true; - # extraOptions = { - # # PKCS11Provider = "/run/current-system/sw/lib/opensc-pkcs11.so"; - # }; - #}; - "gerrit.simatime.com" = { - hostname = "gerrit.simatime.com"; - user = "bsima"; - identityFile = [ "${homedir}/.ssh/gerrit.simatime.com" ]; - identitiesOnly = true; - }; - "lithium" = { - hostname = "192.168.1.9"; - user = "ben"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - #"dev.simatime.com" = { - # user = "ben"; - # identityFile = [ "${homedir}/.ssh/id_rsa" ]; - # identitiesOnly = true; - #}; - "git.platonic.systems" = { - hostname = "git.platonic.systems"; - user = "git"; - identityFile = [ "${homedir}/.ssh/platonic.systems" ]; - identitiesOnly = true; - }; }; }; } |