1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 10:49:44 +01:00
home-manager/tests/modules/programs/alacritty/settings-merging.nix
Robert Helgesson cb09a968e9
tests: add option test.stubs
This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
2021-09-26 23:26:38 +02:00

39 lines
775 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.alacritty = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
window.dimensions = {
lines = 3;
columns = 200;
};
key_bindings = [{
key = "K";
mods = "Control";
chars = "\\x0c";
}];
font = let
defaultFont =
lib.mkMerge [ (lib.mkIf true "SFMono") (lib.mkIf false "Iosevka") ];
in {
normal.family = defaultFont;
bold.family = defaultFont;
};
};
};
nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.yml \
${./settings-merging-expected.yml}
'';
};
}