Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@

/modules/programs/starship.nix @marsam

/modules/programs/tealdeer.nix @marsam

/modules/programs/terminator.nix @chisui

/modules/programs/texlive.nix @rycee
Expand Down
1 change: 1 addition & 0 deletions modules/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ let
./programs/ssh.nix
./programs/starship.nix
./programs/taskwarrior.nix
./programs/tealdeer.nix
./programs/terminator.nix
./programs/termite.nix
./programs/texlive.nix
Expand Down
53 changes: 53 additions & 0 deletions modules/programs/tealdeer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:

with lib;
let
cfg = config.programs.tealdeer;

tomlFormat = pkgs.formats.toml { };

configDir = if pkgs.stdenv.isDarwin then
"Library/Application Support"
else
config.xdg.configHome;

in {
meta.maintainers = [ maintainers.marsam ];

options.programs.tealdeer = {
enable = mkEnableOption "Tealdeer";

settings = mkOption {
type = tomlFormat.type;
default = { };
Comment thread
marsam marked this conversation as resolved.
defaultText = literalExpression "{ }";
example = literalExpression ''
{
display = {
compact = false;
use_pager = true;
};
updates = {
auto_update = false;
};
};
'';
description = ''
Configuration written to
<filename>$XDG_CONFIG_HOME/tealdeer/config.toml</filename> on Linux or
<filename>$HOME/Library/Application Support/tealdeer/config.toml</filename>
on Darwin. See
<link xlink:href="https://dbrgn.github.io/tealdeer/config.html"/>
for more information.
'';
};
};

config = mkIf cfg.enable {
home.packages = [ pkgs.tealdeer ];

home.file."${configDir}/tealdeer/config.toml" = mkIf (cfg.settings != { }) {
source = tomlFormat.generate "tealdeer-config" cfg.settings;
};
};
}