summaryrefslogtreecommitdiff
path: root/nixos/hosts/ev/ente.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/hosts/ev/ente.nix')
-rw-r--r--nixos/hosts/ev/ente.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixos/hosts/ev/ente.nix b/nixos/hosts/ev/ente.nix
new file mode 100644
index 0000000..2ffa18d
--- /dev/null
+++ b/nixos/hosts/ev/ente.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.ente;
+in
+{
+ options.ente = {
+ minioPort = lib.mkOption {
+ type = lib.types.int;
+ };
+
+ minioDataDir = lib.mkOption {
+ type = lib.types.str;
+ };
+ };
+
+ config = {
+ containers.ente-minio = {
+ config = {
+ services.minio = {
+ enable = true;
+ accessKey = "ente";
+ secretKey = "...."; # TODO: pass in via config?
+ dataDir = [cfg.minioDataDir];
+ listenAddress = ":${toString cfg.minioPort}";
+ };
+ };
+ };
+
+ virtualisation.oci-containers.containers.ente = {
+ image = "ghcr.io/ente-io/server";
+ # TODO: specify the rest
+ };
+
+ # TODO: specify that ente oci container requires ente-minio
+ # TODO: specify that ente oci container requires postgresql
+ };
+}