diff --git a/flake.nix b/flake.nix index b0eb4f0..15128a8 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,8 @@ # for git email = "szymon_jozef@proton.me"; fullName = "Szymon P"; + # your public ssh key + signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKxyiqawA95AlLjXGd99sQCVR2rDq2/D7PG/vz7sZv5G"; pathConfig = { wallpaper = "Obrazy/tapety/catppuccin"; diff --git a/modules/cli/git.nix b/modules/cli/git.nix index 49107fa..926917d 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -19,11 +19,13 @@ init.defaultBranch = "master"; push.autoSetupRemote = true; core.editor = "nvim"; + gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; }; signing = { - key = userConfig.email; + key = userConfig.signingKey; signByDefault = true; + format = "ssh"; }; ignores = [ @@ -37,6 +39,10 @@ }; + home.file.".ssh/allowed_signers".text = '' + ${userConfig.email} ${userConfig.signingKey} + ''; + programs.delta = { enable = true; enableGitIntegration = true;