Skip to content

Commit

Permalink
Rename *.esPort for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 15, 2023
1 parent ffc6136 commit 4b18a04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions shared/bookdb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ in
"ALLOW_WRITES" = if cfg.readOnly then "0" else "1";
"BASE_URI" = cfg.baseURI;
"COVER_DIR" = "${cfg.dataDir}/covers";
"ES_HOST" = "http://127.0.0.1:${toString cfg.esPort}";
"ES_HOST" = "http://127.0.0.1:${toString cfg.elasticsearchPort}";
"UUIDS_FILE" = ./uuids.yaml;
};
};
Expand All @@ -54,7 +54,7 @@ in
"xpack.security.enabled" = "false";
"ES_JAVA_OPTS" = "-Xms512M -Xmx512M";
};
ports = [{ host = cfg.esPort; inner = 9200; }];
ports = [{ host = cfg.elasticsearchPort; inner = 9200; }];
volumes = [{ name = "esdata"; inner = "/usr/share/elasticsearch/data"; }];
volumeSubDir = "bookdb";
};
Expand Down
2 changes: 1 addition & 1 deletion shared/bookdb/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with lib;
'';
};

esPort = mkOption {
elasticsearchPort = mkOption {
type = types.int;
default = 47164;
description = mdDoc ''
Expand Down
6 changes: 3 additions & 3 deletions shared/bookmarks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in
environment = {
ALLOW_WRITES = if cfg.readOnly then "0" else "1";
BASE_URI = cfg.baseURI;
ES_HOST = "http://127.0.0.1:${toString cfg.esPort}";
ES_HOST = "http://127.0.0.1:${toString cfg.elasticsearchPort}";
};
};

Expand All @@ -49,13 +49,13 @@ in
"xpack.security.enabled" = "false";
"ES_JAVA_OPTS" = "-Xms512M -Xmx512M";
};
ports = [{ host = cfg.esPort; inner = 9200; }];
ports = [{ host = cfg.elasticsearchPort; inner = 9200; }];
volumes = [{ name = "esdata"; inner = "/usr/share/elasticsearch/data"; }];
volumeSubDir = "bookmarks";
};

nixfiles.backups.scripts.bookmarks = ''
env ES_HOST=http://127.0.0.1:${toString cfg.esPort} ${pkgs.nixfiles.bookmarks}/bin/python -m bookmarks.index.dump | gzip -9 > dump.json.gz
env ES_HOST=http://127.0.0.1:${toString cfg.elasticsearchPort} ${pkgs.nixfiles.bookmarks}/bin/python -m bookmarks.index.dump | gzip -9 > dump.json.gz
'';
};
}
2 changes: 1 addition & 1 deletion shared/bookmarks/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with lib;
'';
};

esPort = mkOption {
elasticsearchPort = mkOption {
type = types.int;
default = 43389;
description = mdDoc ''
Expand Down

0 comments on commit 4b18a04

Please sign in to comment.