nix(loki): add nextcloud container module

This commit is contained in:
surtur 2023-12-03 22:40:55 +01:00
parent a09d7632a5
commit 54b6e38852
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
2 changed files with 42 additions and 0 deletions

@ -17,6 +17,8 @@
./modules/attic.nix ./modules/attic.nix
./modules/podman.nix ./modules/podman.nix
./modules/containers/nextcloud.nix
../../modules/base.nix ../../modules/base.nix
../../modules/dnscrypt.nix ../../modules/dnscrypt.nix
../../modules/uptime-kuma.nix ../../modules/uptime-kuma.nix

@ -0,0 +1,40 @@
{
config,
pkgs,
...
}: let
ver = "26.0.2";
baseDir = "/DATA/services/nextcloud";
p = config.sops.placeholder;
usr = "nx";
in {
virtualisation.oci-containers.containers."nextcloud" = {
autoStart = true;
image = "lscr.io/linuxserver/nextcloud:${ver}";
volumes = [
"${baseDir}/data:/data"
"${baseDir}/certs:/config/keys"
"${baseDir}/config/config.php:/config/www/nextcloud/config/config.php"
];
ports = ["127.0.0.1:8078:443"];
environment = {
# PUID = "${config.users.users.nx.uid}";
# GUID = "${config.users.groups.nx.gid}";
TZ = "Europe/Vienna";
};
};
users.users.nx = {
group = usr;
home = "/etc/" + usr;
createHome = false;
isSystemUser = true;
extraGroups = ["users"];
subUidRanges = [
{
count = 65535;
startUid = 65536 * 29;
}
];
};
users.groups.nx = {};
}