snowflake/user/terminals.nix
2025-05-30 22:59:38 +08:00

34 lines
723 B
Nix

{ config, lib, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.terminals;
in
{
imports = [
./subs/ghostty.nix
./subs/alacritty.nix
];
options.terminals = {
ghostty.enable = mkOption {
default = false;
type = types.bool;
};
alacritty.enable = mkOption {
default = false;
type = types.bool;
};
};
config = {
subs.ghostty.enable = cfg.ghostty.enable;
subs.alacritty.enable = cfg.alacritty.enable;
home.file = {
".config/alacritty/themes/dracula.toml".source = mkIf cfg.alacritty.enable ../config/dracula.toml;
".config/ghostty/themes/ghostty-dracula".source = mkIf cfg.ghostty.enable ../config/ghostty-dracula;
};
};
}