Skip to content

Enable git signing commits and ssh-agent service#264

Merged
kachick merged 30 commits intomainfrom
hm-git
Aug 10, 2023
Merged

Enable git signing commits and ssh-agent service#264
kachick merged 30 commits intomainfrom
hm-git

Conversation

@kachick
Copy link
Copy Markdown
Owner

@kachick kachick commented Aug 9, 2023

May relate to #262

  1. Manage git with home-manager
  2. Enable ssh commit sign with *.pub by Start to manage ssh config with home-manager #263
  3. Resolves Always inputting ssh passphrase #265

Comment thread home-manager/ssh.nix
in
{
# https://github.com/nix-community/home-manager/blob/master/modules/services/ssh-agent.nix
services.ssh-agent.enable = if pkgs.stdenv.isLinux then true else false;
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://unix.stackexchange.com/a/390631

> bat ~/.config/systemd/user/ssh-agent.service
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /home/kachick/.config/systemd/user/ssh-agent.service
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ [Install]
   2   │ WantedBy=default.target
   3   │
   4   │ [Service]
   5   │ ExecStart=/nix/store/11p34v2dfzjavry4kmwlp4d8jhjz4c6c-openssh-9.3p2/bin/ssh-agent -D -a %t/ssh-agent
   6   │
   7   │ [Unit]
   8   │ Description=SSH authentication agent
   9   │ Documentation=man:ssh-agent(1)

Already exists 🤔

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After it

> ps -ef | grep ssh
kachick      516     504  0 15:06 ?        00:00:00 /nix/store/11p34v2dfzjavry4kmwlp4d8jhjz4c6c-openssh-9.3p2/bin/ssh-agent -D -a /run/user/1000/ssh-agent
kachick     1225     652  0 15:07 pts/0    00:00:00 grep ssh

@kachick kachick changed the title Enable git signing commits Enable git signing commits and ssh-agent service Aug 10, 2023
The new go script compiling is failed in macOS, this commit should fail
Comment thread home-manager/home.nix Outdated
# TODO: How to cover lima? The default is /home/kachick.local
home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/${config.home.username}" else "/home/${config.home.username}";

systemd.user.startServices = "sd-switch";
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes following error after several changes, I know nothing about them 🤷‍♂️

thread 'main' panicked at 'Error switching: Failed to connect to socket /run/user/1000/bus

@kachick
Copy link
Copy Markdown
Owner Author

kachick commented Aug 10, 2023

  1. Very tired 😩
  2. Made the world a little better for me ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always inputting ssh passphrase

1 participant