From 3327cbe1f9d355fbeb5ee204908ab1013c18f685 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sat, 27 Feb 2021 15:42:56 -0500 Subject: [PATCH] gh: fix protocol setting (#1831) * gh: fix protocol setting * gh: fix test --- modules/programs/gh.nix | 6 ++++-- tests/modules/programs/gh/config-file.nix | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix index a4f4e17c9..4cda4eab3 100644 --- a/modules/programs/gh.nix +++ b/modules/programs/gh.nix @@ -47,7 +47,9 @@ in { config = mkIf cfg.enable { home.packages = [ pkgs.gh ]; - xdg.configFile."gh/config.yml".text = - builtins.toJSON { inherit (cfg) aliases editor gitProtocol; }; + xdg.configFile."gh/config.yml".text = builtins.toJSON { + inherit (cfg) aliases editor; + git_protocol = cfg.gitProtocol; + }; }; } diff --git a/tests/modules/programs/gh/config-file.nix b/tests/modules/programs/gh/config-file.nix index 8d8f95fdd..71fd74d32 100644 --- a/tests/modules/programs/gh/config-file.nix +++ b/tests/modules/programs/gh/config-file.nix @@ -15,7 +15,7 @@ assertFileExists home-files/.config/gh/config.yml assertFileContent home-files/.config/gh/config.yml ${ builtins.toFile "config-file.yml" '' - {"aliases":{"co":"pr checkout"},"editor":"vim","gitProtocol":"https"}'' + {"aliases":{"co":"pr checkout"},"editor":"vim","git_protocol":"https"}'' } ''; };