From fd4dba558aa52296cc07673266f5fdf1401fddf0 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Mon, 19 Feb 2024 18:09:37 +0100 Subject: [PATCH] wip Signed-off-by: Menno van Leeuwen --- config/gitconfig | 2 ++ home.nix | 17 ++++++++++++++--- setup.sh | 7 +++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/config/gitconfig b/config/gitconfig index eaef17a..fe18cd9 100644 --- a/config/gitconfig +++ b/config/gitconfig @@ -1,7 +1,9 @@ [gpg] format = ssh + [gpg "ssh"] program = /opt/1Password/op-ssh-sign + [commit] gpgsign = true diff --git a/home.nix b/home.nix index e10270e..53ef04d 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,6 @@ -{ config, pkgs, ... }: -{ +{ config, lib, pkgs, ... }: +{ fonts.fontconfig.enable = true; - home = { username = "menno"; homeDirectory = "/home/menno"; @@ -15,6 +14,7 @@ lsd zsh zsh-powerlevel10k + fzf ]; }; @@ -35,6 +35,17 @@ includes = [ { path = "~/.dotfiles/config/gitconfig"; } ]; }; + ssh = { + enable = true; + matchBlocks = { + server = { + port = 22; + hostname = "192.168.86.254"; + user = "menno"; + }; + }; + }; + zsh = { enable = true; diff --git a/setup.sh b/setup.sh index 40a1ca2..455054b 100755 --- a/setup.sh +++ b/setup.sh @@ -133,6 +133,13 @@ elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then # Add `exec zsh` to bashrc add_exec_zsh + # If it's WSL + if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null; then + echo 'WSL detected, adding SSH 1Password symlink...' + sudo mkdir /opt/1Password + sudo ln -s /mnt/c/Users/menno/AppData/Local/1Password/app/8/op-ssh-sign-wsl /opt/1Password/op-ssh-sign + fi + # We're done here! echo 'Installation complete! Please restart your shell and enjoy!' else