nixfiles/home-manager/modules/kermit.nix
2022-09-13 18:08:19 -07:00

37 lines
824 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.programs.kermit;
in
{
options.programs.kermit = {
enable = lib.mkEnableOption "A VTE-based, simple and froggy terminal emulator 🐸";
settings = lib.mkOption {
default = { };
type = with lib.types; attrsOf str;
description = ''
The settings that Kermit should use.
'';
};
extraConfig = lib.mkOption {
default = "";
type = lib.types.lines;
description = ''
Extra config lines for the Kermit config file
'';
};
};
config = lib.mkIf cfg.enable {
xdg.configFile."kermit.conf".text = (lib.generators.toKeyValue
{
mkKeyValue = lib.generators.mkKeyValueDefault { } " ";
}
cfg.settings) + cfg.extraConfig;
home.packages = [ pkgs.kermit-terminal ];
};
}