Janky "fix" to make 1pass git/ssh work

This commit is contained in:
floppydiskette 2024-02-18 01:09:22 +00:00
parent 782f76ba11
commit 241347b926
Signed by: fwoppydwisk
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
3 changed files with 25 additions and 3 deletions

View file

@ -1,12 +1,13 @@
{
pkgs,
lib,
inputs,
...
}: {
imports = [
./packages.nix # home.packages and similar stuff
./neovim-flake.nix
./ssh.nix
./git.nix
];
home = {

17
homes/floppydisk/git.nix Normal file
View file

@ -0,0 +1,17 @@
{
nixosConfig,
lib,
pkgs,
...
}: {
programs.git = {
extraConfig = {
init.defaultBranch = "master";
gpg.format = "ssh";
gpg."ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign";
commit.gpgsign = true;
user.signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcwriIE5K8SVewvVdgNvmhtAVvJPtMnNkkS4ETi5YgJ";
push.autoSetupRemote = true;
};
};
}

View file

@ -12,6 +12,10 @@ in {
programs.ssh = {
enable = true;
forwardAgent = _1passwordAgent.enable;
extraConfig = lib.optionalString _1passwordAgent.enable "IdentityAgent ${_1passwordAgent.path}";
extraConfig = ''
Host *
IdentityAgent ~/.1password/agent.sock
'';
};
}