Skip to content

Commit

Permalink
nixos/services.elasticsearch-curator: remove with lib;
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Dec 29, 2024
1 parent ed7294a commit 064afbe
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions nixos/modules/services/search/elasticsearch-curator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
pkgs,
...
}:

with lib;

let
cfg = config.services.elasticsearch-curator;
curatorConfig = pkgs.writeTextFile {
Expand Down Expand Up @@ -43,25 +40,25 @@ in

options.services.elasticsearch-curator = {

enable = mkEnableOption "elasticsearch curator";
interval = mkOption {
enable = lib.mkEnableOption "elasticsearch curator";
interval = lib.mkOption {
description = "The frequency to run curator, a systemd.time such as 'hourly'";
default = "hourly";
type = types.str;
type = lib.types.str;
};
hosts = mkOption {
hosts = lib.mkOption {
description = "a list of elasticsearch hosts to connect to";
type = types.listOf types.str;
type = lib.types.listOf lib.types.str;
default = [ "localhost" ];
};
port = mkOption {
port = lib.mkOption {
description = "the port that elasticsearch is listening on";
type = types.port;
type = lib.types.port;
default = 9200;
};
actionYAML = mkOption {
actionYAML = lib.mkOption {
description = "curator action.yaml file contents, alternatively use curator-cli which takes a simple action command";
type = types.lines;
type = lib.types.lines;
example = ''
---
actions:
Expand All @@ -88,7 +85,7 @@ in
};
};

config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd.services.elasticsearch-curator = {
startAt = cfg.interval;
serviceConfig = {
Expand Down

0 comments on commit 064afbe

Please sign in to comment.