From e03fef4ed0dfb7522d03fd7d6a6c07ff699bbf6f Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 30 Dec 2024 10:17:09 +0100 Subject: feat(ev): add ente --- nixos/hosts/ev/default.nix | 5 +++++ nixos/hosts/ev/ente.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 nixos/hosts/ev/ente.nix diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index e59ec01..ce7aace 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -9,14 +9,17 @@ imports = [ ./hardware-configuration.nix + + ./ente.nix ./home-automation.nix ./kodi.nix ./torrent.nix ]; + ente.minioPort = 3200; home-automation.zigbee2mqttPort = 8080; torrent.qbittorrentWebUiPort = 7777; torrent.networkNamespace = "se"; @@ -36,6 +39,8 @@ }; }; + ente.minioDataDir = "/mnt/personal/ente-test"; # TODO: change to /mnt/personal/ente + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; 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 + }; +} -- cgit v1.2.3