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:
parent
b24689a173
commit
0bbc3fc5c6
1 changed files with 2 additions and 2 deletions
|
|
@ -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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue