1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 21:11:08 +01:00

alacritty: null package support

This commit is contained in:
Austin Horstman 2025-03-30 11:46:08 -05:00
parent b24689a173
commit 0bbc3fc5c6

View file

@ -7,7 +7,7 @@ in {
programs.alacritty = {
enable = lib.mkEnableOption "Alacritty";
package = lib.mkPackageOption pkgs "alacritty" { };
package = lib.mkPackageOption pkgs "alacritty" { nullable = true; };
theme = lib.mkOption {
type = with lib.types; nullOr str;
@ -71,7 +71,7 @@ in {
message = "The alacritty theme '${cfg.theme}' does not exist.";
}];
home.packages = [ cfg.package ];
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
programs.alacritty.settings = let
theme = "${pkgs.alacritty-theme}/share/alacritty-theme/${cfg.theme}.toml";