47 lines
1006 B
Nix
47 lines
1006 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.overrideAttrs (super: {
|
|
postInstall = ''
|
|
sed -i 's/\/usr\/bin\///' $out/share/applications/kermit.desktop
|
|
'';
|
|
}))
|
|
];
|
|
};
|
|
}
|