1
Files
flake-nixinator/system/services/heidi.nix

40 lines
821 B
Nix

{
config,
lib,
pkgs,
...
}: {
virtualisation.oci-containers.containers.heidi = {
image = "gitea.vps.chriphost.de/christoph/discord-heidi:latest";
autoStart = true;
dependsOn = [];
ports = [];
volumes = [
"heidi_config:/config"
"/home/christoph/heidi-sounds:/sounds:ro"
];
environment = {
DOCKER = "True";
};
# If we need to pass secrets to containers we can't use plain env variables.
sops.templates."heidi_secrets.env".content = ''
DISCORD_TOKEN=${config.sops.placeholder."heidi-discord-token"}
'';
environmentFiles = [
config.sops.templates."heidi_secrets.env".path
];
extraOptions = [
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
"--net=behind-nginx"
];
};
}