From 40ea4d34c9b38674de9f5b15eae4db43778e5e0d Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 15 Jul 2024 17:55:20 +0200 Subject: [PATCH] feat: set up ssh keys --- users/buffet/default.nix | 1 + users/buffet/git.nix | 12 ++++++++---- users/buffet/ssh.nix | 13 +++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 users/buffet/ssh.nix diff --git a/users/buffet/default.nix b/users/buffet/default.nix index 8a5362b..0b88e82 100644 --- a/users/buffet/default.nix +++ b/users/buffet/default.nix @@ -15,6 +15,7 @@ ./ime.nix ./mako.nix ./nvd.nix + ./ssh.nix ./sway.nix ]; diff --git a/users/buffet/git.nix b/users/buffet/git.nix index 653ac14..8b06d66 100644 --- a/users/buffet/git.nix +++ b/users/buffet/git.nix @@ -18,10 +18,6 @@ s = "status -s"; }; - signing = { - key = "EBAC355935FD7382"; - }; - extraConfig = { branch = { sort = "-committerdate"; @@ -31,6 +27,10 @@ defaultBranch = "main"; }; + gpg = { + format = "ssh"; + }; + push = { autoSetupRemote = true; }; @@ -38,6 +38,10 @@ pull = { ff = "only"; }; + + user = { + signingKey = "~/.ssh/id_buffet"; + }; }; }; }; diff --git a/users/buffet/ssh.nix b/users/buffet/ssh.nix new file mode 100644 index 0000000..538740d --- /dev/null +++ b/users/buffet/ssh.nix @@ -0,0 +1,13 @@ +{ + home-manager.users.buffet = { + programs.ssh = { + enable = true; + extraConfig = '' + Host kitchen + Hostname buffets.kitchen + User forgejo + IdentityFile ~/.ssh/id_buffet_ecdsa + ''; + }; + }; +}