Skip to content

Commit

Permalink
Document umami module and options
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 15, 2023
1 parent b4fd464 commit cc5f131
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
10 changes: 10 additions & 0 deletions shared/umami/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# [umami][] is a web analytics tool.
#
# umami uses a containerised postgres 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.
#
# [umami]: https://umami.is/
{ config, lib, pkgs, ... }:

with lib;
Expand Down
44 changes: 39 additions & 5 deletions shared/umami/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,44 @@ with lib;

{
options.nixfiles.umami = {
enable = mkOption { type = types.bool; default = false; };
port = mkOption { type = types.int; default = 46489; };
postgresTag = mkOption { type = types.str; default = "13"; };
umamiTag = mkOption { type = types.str; default = "postgresql-latest"; };
environmentFile = mkOption { type = types.str; };
enable = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Enable the umami service.
'';
};

port = mkOption {
type = types.int;
default = 46489;
description = mdDoc ''
Port (on 127.0.0.1) to expose umami on.
'';
};

postgresTag = mkOption {
type = types.str;
default = "13";
description = mdDoc ''
Tag to use of the `postgres` container image.
'';
};

umamiTag = mkOption {
type = types.str;
default = "postgresql-latest";
description = mdDoc ''
Tag to use of the `ghcr.io/mikecao/umami` container image.
'';
};

environmentFile = mkOption {
type = types.str;
description = mdDoc ''
Environment file to be pased to the container. This needs to contain a
`HASH_SALT`.
'';
};
};
}

0 comments on commit cc5f131

Please sign in to comment.