1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

alacritty: add package option

PR #1372
This commit is contained in:
Leon Kowarschick 2020-07-03 19:09:35 +02:00 committed by Robert Helgesson
parent 89adfc9f01
commit 2e7935767f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 9 additions and 5 deletions

View file

@ -11,6 +11,13 @@ in {
programs.alacritty = { programs.alacritty = {
enable = mkEnableOption "Alacritty"; enable = mkEnableOption "Alacritty";
package = mkOption {
type = types.package;
default = pkgs.alacritty;
defaultText = literalExample "pkgs.alacritty";
description = "The Alacritty package to install.";
};
settings = mkOption { settings = mkOption {
type = types.attrs; type = types.attrs;
default = { }; default = { };
@ -41,7 +48,7 @@ in {
config = mkMerge [ config = mkMerge [
(mkIf cfg.enable { (mkIf cfg.enable {
home.packages = [ pkgs.alacritty ]; home.packages = [ cfg.package ];
xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != { }) { xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != { }) {
text = text =

View file

@ -6,6 +6,7 @@ with lib;
config = { config = {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
package = pkgs.writeScriptBin "dummy-alacritty" "";
settings = { settings = {
window.dimensions = { window.dimensions = {
@ -21,10 +22,6 @@ with lib;
}; };
}; };
nixpkgs.overlays = [
(self: super: { alacritty = pkgs.writeScriptBin "dummy-alacritty" ""; })
];
nmt.script = '' nmt.script = ''
assertFileContent \ assertFileContent \
home-files/.config/alacritty/alacritty.yml \ home-files/.config/alacritty/alacritty.yml \