40 lines
901 B
Nix
40 lines
901 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
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;
|
|
};
|
|
xfceTerminal.enable = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
};
|
|
};
|
|
|
|
config = {
|
|
subs.ghostty.enable = cfg.ghostty.enable;
|
|
subs.alacritty.enable = cfg.alacritty.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;
|
|
};
|
|
};
|
|
}
|