From 660385ee340103888093b571c073bb2da13bea1b Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:34:18 +0530 Subject: [PATCH] refactor: declare github helper command for repeated use --- home.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home.nix b/home.nix index 67b7bf6..ced6abf 100644 --- a/home.nix +++ b/home.nix @@ -1,5 +1,6 @@ { config, pkgs, ... }: +let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in { imports = [ ./gnome.nix ]; @@ -42,8 +43,8 @@ delta.enable = true; extraConfig = { - credential."https://github.com".helper = "${pkgs.gh}/bin/gh auth git-credential"; - credential."https://gist.github.com".helper = "${pkgs.gh}/bin/gh auth git-credential"; + credential."https://github.com".helper = githubHelper; + credential."https://gist.github.com".helper = githubHelper; gpg.format = "ssh"; }; signing.signByDefault = true;