snowflake/user/terminals.nix
2025-06-02 22:45:36 +08:00

46 lines
1.0 KiB
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.terminals;
in
{
imports = [
./subs/ghostty.nix
./subs/alacritty.nix
./subs/foot.nix
];
options.terminals = {
ghostty.enable = mkOption {
default = true;
type = types.bool;
};
alacritty.enable = mkOption {
default = true;
type = types.bool;
};
xfceTerminal.enable = mkOption {
default = true;
type = types.bool;
};
foot.enable = mkOption {
default = false;
type = types.bool;
};
};
config = {
subs.ghostty.enable = cfg.ghostty.enable;
subs.alacritty.enable = cfg.alacritty.enable;
subs.foot.enable = cfg.foot.enable;
home.packages = mkIf cfg.xfceTerminal.enable [ pkgs.xfce.xfce4-terminal ];
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;
};
};
}