mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-09 10:16:55 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
32 lines
845 B
Nix
32 lines
845 B
Nix
{ options, lib, ... }:
|
|
|
|
{
|
|
programs.gh = {
|
|
enable = true;
|
|
aliases = { co = "pr checkout"; };
|
|
editor = "vim";
|
|
};
|
|
|
|
test.asserts.warnings.expected = [
|
|
"The option `programs.gh.editor' defined in ${
|
|
lib.showFiles options.programs.gh.editor.files
|
|
} has been renamed to `programs.gh.settings.editor'."
|
|
"The option `programs.gh.aliases' defined in ${
|
|
lib.showFiles options.programs.gh.aliases.files
|
|
} has been renamed to `programs.gh.settings.aliases'."
|
|
];
|
|
test.asserts.warnings.enable = true;
|
|
|
|
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
|
|
git_protocol: https
|
|
version: '1'
|
|
''
|
|
}
|
|
'';
|
|
}
|