DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 1ed6268e307d7b7d3dfa1c36757788192339a05e nix-arta/systems/hosts/oci/umami.nix -rw-r--r-- 830 bytes
1ed6268eJonni Liljamo chore: update nvim-flake 14 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{pkgs, ...}: let
  umamiPort = 3000;
in {
  networking.firewall.allowedTCPPorts = [
    umamiPort
  ];

  services.postgresql = {
    package = pkgs.postgresql_16;
    enable = true;
    enableTCPIP = true;
    authentication = "host umami umami 127.0.0.1/32 trust";
    ensureDatabases = ["umami"];
    ensureUsers = [
      {
        name = "umami";
        ensureDBOwnership = true;
      }
    ];
  };

  virtualisation.oci-containers.containers."umami" = {
    image = "ghcr.io/umami-software/umami:postgresql-v2.13.2";
    extraOptions = [
      "--network=host"
    ];
    hostname = "umami";
    environment = {
      PORT = toString umamiPort;
      DATABASE_TYPE = "postgresql";
      DATABASE_URL = "postgresql://umami:umami@127.0.0.1:5432/umami";
      DISABLE_TELEMETRY = "1";
      PRIVATE_MODE = "1";
    };
  };
}