alacritty: don't create file if settings is empty
Also add a few test cases for the alacritty module.
This commit is contained in:
parent
8b15f18993
commit
d2ed39f103
6 changed files with 59 additions and 5 deletions
|
|
@ -41,10 +41,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.alacritty ];
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
home.packages = [ pkgs.alacritty ];
|
||||
|
||||
xdg.configFile."alacritty/alacritty.yml".text =
|
||||
replaceStrings ["\\\\"] ["\\"] (builtins.toJSON cfg.settings);
|
||||
};
|
||||
xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != {}) {
|
||||
text = replaceStrings ["\\\\"] ["\\"] (builtins.toJSON cfg.settings);
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue