diff options
Diffstat (limited to 'modules/dashboard')
| -rw-r--r-- | modules/dashboard/default.nix | 10 | ||||
| -rw-r--r-- | modules/dashboard/links.nix | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/modules/dashboard/default.nix b/modules/dashboard/default.nix index 9bde252..f3c55ff 100644 --- a/modules/dashboard/default.nix +++ b/modules/dashboard/default.nix @@ -1,10 +1,18 @@ -{ settings, ... }: +{ settings, lib, ... }: +with lib; let links = import ./links.nix { inherit settings; }; + isKeysUnique = + let linkKeys = map (l: l.key) (filter (hasAttr "key") links); + in length linkKeys == length (lib.unique linkKeys); in { imports = [ ../../services/bacchus-dashboard/bacchus-dashboard.service.nix ]; + assertions = [ + { assertion = isKeysUnique; message = "The dashboard link 'key' property must be unique"; } + ]; + services.bacchus-dashboard = { enable = true; openFirewall = true; diff --git a/modules/dashboard/links.nix b/modules/dashboard/links.nix index 9a89c2b..1ccded8 100644 --- a/modules/dashboard/links.nix +++ b/modules/dashboard/links.nix @@ -66,4 +66,11 @@ in [ altUrl = "http://${host}:${toString ports.send}"; color = "#AA5CC3"; } + { + title = "Immich"; + key = "i"; + url = "http://photos.local"; + altUrl = "http://${host}:${toString ports.immich}"; + color = "#fa2921"; + } ] |
