git-credential-oauth: fix use of mkIf and add tests

Closes #6005
This commit is contained in:
Tomo 2024-10-26 23:45:32 -07:00 committed by GitHub
parent 93435d27d2
commit 05d9bee4a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
programs.git-credential-oauth = { enable = true; };
programs.git = { enable = true; };
test.stubs.git-credential-oauth = { };
nmt.script = ''
assertFileExists home-files/.config/git/config
assertFileContains \
home-files/.config/git/config \
"${config.programs.git-credential-oauth.package}/bin/git-credential-oauth"
'';
}