.github
.vscode
docs
hydra
keys
lib
modules
pkgs
systems
artemision
palatine-hill
attic
docker
archiveteam.nix
books.nix
default.nix
firefly.nix
foundry.nix
glances.nix
haproxy.cfg
haproxy.nix
minecraft.nix
nextcloud.nix
postgres.nix
restic.nix
torr.nix
unifi.nix
haproxy
configuration.nix
default.nix
hardware-changes.nix
hardware.nix
hydra.nix
minio.nix
networking.nix
nextcloud.nix
secrets.yaml
services.nix
vars.nix
zfs.nix
users
utils
.envrc
.gitconfig
.gitignore
.sops.yaml
CONTRIBUTING.md
README.md
checks.nix
flake.lock
flake.nix
shell.nix
statix.toml
treefmt.toml
69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{ config, ... }:
|
|
|
|
let
|
|
vars = import ../vars.nix;
|
|
nextcloud_path = vars.primary_nextcloud;
|
|
|
|
# nextcloud-image = import ./nextcloud-image { inherit pkgs; };
|
|
nextcloud-base = {
|
|
image = "nextcloud:stable-apache";
|
|
hostname = "nextcloud";
|
|
volumes = [
|
|
"${nextcloud_path}/nc_data:/var/www/html:z"
|
|
"${nextcloud_path}/nc_php:/usr/local/etc/php"
|
|
"${nextcloud_path}/nc_prehooks:/docker-entrypoint-hooks.d/before-starting"
|
|
];
|
|
extraOptions = [
|
|
"--restart=unless-stopped"
|
|
"--network=haproxy-net"
|
|
"--network=postgres-net"
|
|
"--network=nextcloud_default"
|
|
];
|
|
dependsOn = [ "redis" ];
|
|
environmentFiles = [ config.sops.secrets."docker/nextcloud".path ];
|
|
};
|
|
in
|
|
{
|
|
virtualisation.oci-containers.containers = {
|
|
nextcloud = nextcloud-base // {
|
|
ports = [ "9999:80" ];
|
|
};
|
|
nextcloud-cron = nextcloud-base // {
|
|
entrypoint = "/cron.sh";
|
|
dependsOn = [
|
|
"redis"
|
|
"nextcloud"
|
|
];
|
|
};
|
|
redis = {
|
|
image = "redis:latest";
|
|
extraOptions = [ "--restart=unless-stopped" ];
|
|
volumes = [ "${config.sops.secrets."docker/redis".path}:/usr/local/etc/redis/redis.conf" ];
|
|
cmd = [
|
|
"redis-server"
|
|
config.sops.secrets."docker/redis".path
|
|
];
|
|
};
|
|
go-vod = {
|
|
image = "radialapps/go-vod";
|
|
dependsOn = [ "nextcloud" ];
|
|
environment = {
|
|
NEXTCLOUD_HOST = "https://nextcloud.alicehuston.xyz";
|
|
};
|
|
volumes = [ "${nextcloud_path}/nc_data:/var/www/html:ro" ];
|
|
extraOptions = [
|
|
"--restart=always"
|
|
"--device=/dev/dri:/dev/dri"
|
|
];
|
|
};
|
|
};
|
|
|
|
sops = {
|
|
defaultSopsFile = ../secrets.yaml;
|
|
secrets = {
|
|
"docker/redis".owner = "docker-service";
|
|
"docker/nextcloud".owner = "docker-service";
|
|
};
|
|
};
|
|
}
|