34 lines
733 B
Nix
34 lines
733 B
Nix
|
{
|
||
|
pkgs,
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
cfg = config.eboskma.programs.ghostty;
|
||
|
iniFormat = pkgs.formats.iniWithGlobalSection { listsAsDuplicateKeys = true; };
|
||
|
in
|
||
|
{
|
||
|
options.eboskma.programs.ghostty = {
|
||
|
enable = lib.mkEnableOption "ghostty";
|
||
|
package = lib.mkPackageOption pkgs "ghostty" { };
|
||
|
|
||
|
settings = lib.mkOption {
|
||
|
description = "Ghostty config.";
|
||
|
type = lib.types.submodule {
|
||
|
freeformType = iniFormat.type;
|
||
|
};
|
||
|
default = { };
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
home.packages = [ cfg.package ];
|
||
|
|
||
|
xdg.configFile.ghostty-config = {
|
||
|
target = "ghostty/config";
|
||
|
source = iniFormat.generate "ghostty-config" { globalSection = cfg.settings; };
|
||
|
};
|
||
|
};
|
||
|
}
|