mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
alacritty: null package support
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user