diff --git a/modules/programs/alacritty.nix b/modules/programs/alacritty.nix index 69b9ea96..ea908f2b 100644 --- a/modules/programs/alacritty.nix +++ b/modules/programs/alacritty.nix @@ -11,6 +11,13 @@ in { programs.alacritty = { enable = mkEnableOption "Alacritty"; + package = mkOption { + type = types.package; + default = pkgs.alacritty; + defaultText = literalExample "pkgs.alacritty"; + description = "The Alacritty package to install."; + }; + settings = mkOption { type = types.attrs; default = { }; @@ -41,7 +48,7 @@ in { config = mkMerge [ (mkIf cfg.enable { - home.packages = [ pkgs.alacritty ]; + home.packages = [ cfg.package ]; xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != { }) { text = diff --git a/tests/modules/programs/alacritty/example-settings.nix b/tests/modules/programs/alacritty/example-settings.nix index 46be1064..c3671aa0 100644 --- a/tests/modules/programs/alacritty/example-settings.nix +++ b/tests/modules/programs/alacritty/example-settings.nix @@ -6,6 +6,7 @@ with lib; config = { programs.alacritty = { enable = true; + package = pkgs.writeScriptBin "dummy-alacritty" ""; settings = { window.dimensions = { @@ -21,10 +22,6 @@ with lib; }; }; - nixpkgs.overlays = [ - (self: super: { alacritty = pkgs.writeScriptBin "dummy-alacritty" ""; }) - ]; - nmt.script = '' assertFileContent \ home-files/.config/alacritty/alacritty.yml \