modules.services.send: use native package

This commit is contained in:
2024-12-25 12:41:50 +08:00
parent 09b7b587eb
commit 812669bac0

View File

@@ -10,34 +10,20 @@ inputs:
};
config = let inherit (inputs.config.nixos.services) send; in inputs.lib.mkIf (send != null)
{
virtualisation.oci-containers.containers.send =
services.send =
{
image = "timvisee/send:1ee4951";
imageFile = inputs.pkgs.dockerTools.pullImage
enable = true;
baseUrl = "https://${send.hostname}";
environment.MAX_FILE_SIZE = "17179869184";
redis =
{
imageName = "registry.gitlab.com/timvisee/send";
imageDigest = "sha256:1ee495161f176946e6e4077e17be2b8f8634c2d502172cc530a8cd5affd7078f";
sha256 = "1dimqga35c2ka4advhv3v60xcsdrhc6c4hh21x36fbyhk90n2vzs";
finalImageName = "timvisee/send";
finalImageTag = "1ee4951";
createLocally = false;
host = "127.0.0.1";
port = 9184;
passwordFile = inputs.config.sops.secrets."redis/send".path;
};
ports = [ "127.0.0.1:1443:1443/tcp" ];
volumes = [ "send:/uploads" ];
extraOptions = [ "--add-host=host.docker.internal:host-gateway" ];
environmentFiles = [ inputs.config.sops.templates."send/env".path ];
};
systemd.services.docker-send.after = [ "redis-send.service" ];
sops =
{
templates."send/env".content =
''
BASE_URL=https://${send.hostname}
MAX_FILE_SIZE=17179869184
REDIS_HOST=host.docker.internal
REDIS_PORT=9184
REDIS_PASSWORD=${inputs.config.sops.placeholder."redis/send"}
'';
};
systemd.services.send.after = [ "redis-send.service" ];
nixos.services =
{
nginx =