mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
tealdeer: add module (#2928)
This commit is contained in:
parent
df6010551d
commit
26858fc0db
3 changed files with 56 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -245,6 +245,8 @@
|
||||||
|
|
||||||
/modules/programs/starship.nix @marsam
|
/modules/programs/starship.nix @marsam
|
||||||
|
|
||||||
|
/modules/programs/tealdeer.nix @marsam
|
||||||
|
|
||||||
/modules/programs/terminator.nix @chisui
|
/modules/programs/terminator.nix @chisui
|
||||||
|
|
||||||
/modules/programs/texlive.nix @rycee
|
/modules/programs/texlive.nix @rycee
|
||||||
|
|
|
@ -149,6 +149,7 @@ let
|
||||||
./programs/ssh.nix
|
./programs/ssh.nix
|
||||||
./programs/starship.nix
|
./programs/starship.nix
|
||||||
./programs/taskwarrior.nix
|
./programs/taskwarrior.nix
|
||||||
|
./programs/tealdeer.nix
|
||||||
./programs/terminator.nix
|
./programs/terminator.nix
|
||||||
./programs/termite.nix
|
./programs/termite.nix
|
||||||
./programs/texlive.nix
|
./programs/texlive.nix
|
||||||
|
|
53
modules/programs/tealdeer.nix
Normal file
53
modules/programs/tealdeer.nix
Normal file
|
@ -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 = { };
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue