1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-15 05:21:06 +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 = { programs.alacritty = {
enable = lib.mkEnableOption "Alacritty"; enable = lib.mkEnableOption "Alacritty";
package = lib.mkPackageOption pkgs "alacritty" { }; package = lib.mkPackageOption pkgs "alacritty" { nullable = true; };
theme = lib.mkOption { theme = lib.mkOption {
type = with lib.types; nullOr str; type = with lib.types; nullOr str;
@ -71,7 +71,7 @@ in {
message = "The alacritty theme '${cfg.theme}' does not exist."; 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 programs.alacritty.settings = let
theme = "${pkgs.alacritty-theme}/share/alacritty-theme/${cfg.theme}.toml"; theme = "${pkgs.alacritty-theme}/share/alacritty-theme/${cfg.theme}.toml";