gh: add module
This commit is contained in:
parent
308ee310de
commit
22a3a5651d
7 changed files with 93 additions and 0 deletions
27
tests/modules/programs/gh/config-file.nix
Normal file
27
tests/modules/programs/gh/config-file.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
aliases = { co = "pr checkout"; };
|
||||
editor = "vim";
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
gitAndTools = super.gitAndTools // {
|
||||
gh = pkgs.writeScriptBin "dummy-gh" "";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
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"}''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
1
tests/modules/programs/gh/default.nix
Normal file
1
tests/modules/programs/gh/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ gh-config-file = ./config-file.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue