tldr-update: init (#6401)
Adds `tldr-update` module for enabling automatic `tldr update` on a schedule. Adds option to `tealdeer` to enable integration with new `tldr-update` module.
This commit is contained in:
parent
5af1b9a0f1
commit
b0bd29bb4b
8 changed files with 101 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ in {
|
|||
See <https://tealdeer-rs.github.io/tealdeer/config.html> for more information.
|
||||
'';
|
||||
};
|
||||
|
||||
enableAutoUpdates = mkEnableOption "Auto updates" // {
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
@ -89,5 +94,10 @@ in {
|
|||
mkIf (cfg.settings != null && cfg.settings != { }) {
|
||||
source = tomlFormat.generate "tealdeer-config" cfg.settings;
|
||||
};
|
||||
|
||||
services.tldr-update = mkIf cfg.enableAutoUpdates {
|
||||
enable = true;
|
||||
package = pkgs.tealdeer;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue