diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-30 10:17:09 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-30 10:27:12 +0100 |
commit | e03fef4ed0dfb7522d03fd7d6a6c07ff699bbf6f (patch) | |
tree | 38715650df41b5a48d12fad5704a67fcfabfdb17 | |
parent | d2d37440b5742bf0b4878ba6de2de1ed4abfc18a (diff) |
feat(ev): add enteente
-rw-r--r-- | nixos/hosts/ev/default.nix | 5 | ||||
-rw-r--r-- | nixos/hosts/ev/ente.nix | 38 |
2 files changed, 43 insertions, 0 deletions
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 <top/profiles/server> + <top/shared/postgresql.nix> <top/shared/tailscale.nix> <top/shared/basics-physical.nix> <top/shared/vpn.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 + }; +} |