mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 15:14:26 +00:00
alacritty: add module
This commit is contained in:
parent
9c0536deda
commit
e3831d8ecc
3 changed files with 58 additions and 0 deletions
|
@ -1058,6 +1058,13 @@ in
|
|||
A new module is available: 'programs.skim'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2019-04-22T12:43:20+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.alacritty'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ let
|
|||
(loadModule ./misc/version.nix { })
|
||||
(loadModule ./misc/xdg.nix { })
|
||||
(loadModule ./programs/afew.nix { })
|
||||
(loadModule ./programs/alacritty.nix { })
|
||||
(loadModule ./programs/alot.nix { })
|
||||
(loadModule ./programs/astroid.nix { })
|
||||
(loadModule ./programs/autorandr.nix { })
|
||||
|
|
50
modules/programs/alacritty.nix
Normal file
50
modules/programs/alacritty.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.alacritty;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
programs.alacritty = {
|
||||
enable = mkEnableOption "Alacritty";
|
||||
|
||||
settings = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
window.dimensions = {
|
||||
lines = 3;
|
||||
columns = 200;
|
||||
};
|
||||
key_bindings = [
|
||||
{
|
||||
key = "K";
|
||||
mods = "Control";
|
||||
chars = "\\x0c";
|
||||
}
|
||||
];
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>~/.config/alacritty/alacritty.yml</filename>. See
|
||||
<link xlink:href="https://github.com/jwilm/alacritty/blob/master/alacritty.yml"/>
|
||||
for the default configuration.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.alacritty ];
|
||||
|
||||
xdg.configFile."alacritty/alacritty.yml".text =
|
||||
replaceStrings ["\\\\"] ["\\"] (builtins.toJSON cfg.settings);
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue