summaryrefslogtreecommitdiff
path: root/modules/server/virtualisation/containers/locus.nix
blob: 83c36c2514b57291f18e2e22db95c92283201bf6 (plain) (blame)
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
{ config, ... }:
let
  port = 1965;
in
{
  networking.firewall.allowedTCPPorts = [
    port
  ];

  virtualisation.oci-containers.containers.locus = {
    inherit (config.modules.containers) extraOptions;

    image = "ghcr.io/gemrest/locus:2025.05.27";
    autoStart = true;
    volumes = [ "/mnt/docker/locus:/locus/.locus" ];
    environment.HEADER_IMAGE = "https://ruu.neocities.org/images/animeHeader.gif";
    environmentFiles = [ config.sops.secrets.finnhub_token.path ];

    ports =
      let
        portString = toString port;
      in
      [ "${portString}:${portString}" ];

    login = {
      registry = "ghcr.io";
      username = config.sops.secrets."ghcr/user".path;
      passwordFile = config.sops.secrets."ghcr/password".path;
    };
  };
}