treewide: replace attrs by formats or types.anything
This commit is contained in:
parent
c1faa848c5
commit
44f9d68d8c
20 changed files with 134 additions and 64 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
alacritty-example-settings = ./example-settings.nix;
|
||||
alacritty-empty-settings = ./empty-settings.nix;
|
||||
alacritty-merging-settings = ./settings-merging.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
{"font":{"bold":{"family":"SFMono"},"normal":{"family":"SFMono"}},"key_bindings":[{"chars":"\x0c","key":"K","mods":"Control"}],"window":{"dimensions":{"columns":200,"lines":3}}}
|
||||
39
tests/modules/programs/alacritty/settings-merging.nix
Normal file
39
tests/modules/programs/alacritty/settings-merging.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-alacritty" "";
|
||||
|
||||
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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -27,7 +27,25 @@ let
|
|||
else
|
||||
".config/Code/User/keybindings.json";
|
||||
|
||||
expectedJson = pkgs.writeText "expected.json" (builtins.toJSON bindings);
|
||||
expectedJson = pkgs.writeText "expected.json" ''
|
||||
[
|
||||
{
|
||||
"command": "editor.action.clipboardCopyAction",
|
||||
"key": "ctrl+c",
|
||||
"when": "textInputFocus && false"
|
||||
},
|
||||
{
|
||||
"command": "deleteFile",
|
||||
"key": "ctrl+c",
|
||||
"when": ""
|
||||
},
|
||||
{
|
||||
"command": "deleteFile",
|
||||
"key": "d",
|
||||
"when": "explorerViewletVisible"
|
||||
}
|
||||
]
|
||||
'';
|
||||
in {
|
||||
config = {
|
||||
programs.vscode = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue