Skip to content

Commit

Permalink
Document bookmarks module and options
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 15, 2023
1 parent f2f395f commit e78cb05
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 7 deletions.
11 changes: 11 additions & 0 deletions shared/bookmarks/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Webapp to keep track of all my bookmarks, deployed to
# [bookmarks.barrucadu.co.uk][].
#
# bookmarks uses a containerised elasticsearch database.
#
# If the `backups` module is enabled, adds a script to backup the database.
#
# If the `erase-your-darlings` module is enabled, stores its data on the
# persistent volume.
#
# [bookmarks.barrucadu.co.uk]: https://bookmarks.barrucadu.co.uk/
{ config, lib, pkgs, ... }:

with lib;
Expand Down
64 changes: 57 additions & 7 deletions shared/bookmarks/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,62 @@ with lib;

{
options.nixfiles.bookmarks = {
enable = mkOption { type = types.bool; default = false; };
port = mkOption { type = types.int; default = 48372; };
esPort = mkOption { type = types.int; default = 43389; };
esTag = mkOption { type = types.str; default = "8.0.0"; };
baseURI = mkOption { type = types.str; };
readOnly = mkOption { type = types.bool; default = false; };
environmentFile = mkOption { type = types.nullOr types.str; default = null; };
enable = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Enable the `bookmarks` module.
'';
};

port = mkOption {
type = types.int;
default = 48372;
description = mdDoc ''
Port (on 127.0.0.1) to expose the bookmarks service on.
'';
};

esPort = mkOption {
type = types.int;
default = 43389;
description = mdDoc ''
Port (on 127.0.0.1) to expose the elasticsearch container on.
'';
};

esTag = mkOption {
type = types.str;
default = "8.0.0";
description = mdDoc ''
Tag to use of the `elasticsearch` container image.
'';
};

baseURI = mkOption {
type = types.str;
example = "https://bookmarks.barrucadu.co.uk";
description = mdDoc ''
URI which the service will be exposed on, used to generate URLs.
'';
};

readOnly = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Whether to launch the service in "read-only" mode. Enable this if
exposing it to a public network.
'';
};

environmentFile = mkOption {
type = types.nullOr types.str;
default = null;
description = mdDoc ''
Environment file to be passed to the systemd services. This needs to
contain a `YOUTUBE_API_KEY` if not running in read-only mode.
'';
};
};
}

0 comments on commit e78cb05

Please sign in to comment.