mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Nixpkgs switched pkgs.formats.yaml to remarshal v2. Generated files now start with a %YAML 1.1 directive and a --- document start, and multiline strings use double-quoted escapes. Only files written through yamlFormat.generate change. Modules that declare the YAML type but write the file with builtins.toJSON keep their current output.
31 lines
833 B
Nix
31 lines
833 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" ''
|
|
%YAML 1.1
|
|
---
|
|
aliases:
|
|
co: pr checkout
|
|
editor: vim
|
|
git_protocol: https
|
|
version: '1'
|
|
''}
|
|
'';
|
|
}
|