feat: add nextcloud to kanidm

This commit is contained in:
Leon Schwarzäugl 2025-06-09 18:11:02 +02:00
parent 3e3721d44f
commit 9d10005e35
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
11 changed files with 338 additions and 180 deletions

View file

@ -1,27 +1,38 @@
{ pkgs, lib, config, ... }:
let
nextcloudDomain = "stash.swarsel.win";
in
{
options.swarselsystems.modules.server.nextcloud = lib.mkEnableOption "enable nextcloud on server";
config = lib.mkIf config.swarselsystems.modules.server.nextcloud {
sops.secrets.nextcloudadminpass = {
owner = "nextcloud";
group = "nextcloud";
mode = "0440";
sops.secrets = {
nextcloudadminpass = {
owner = "nextcloud";
group = "nextcloud";
mode = "0440";
};
kanidm-nextcloud-client = {
owner = "nextcloud";
group = "nextcloud";
mode = "0440";
};
};
services = {
nextcloud = {
enable = true;
package = pkgs.nextcloud31;
hostName = "stash.swarsel.win";
hostName = nextcloudDomain;
home = "/Vault/apps/nextcloud";
datadir = "/Vault/data/nextcloud";
https = true;
configureRedis = true;
maxUploadSize = "4G";
extraApps = {
inherit (pkgs.nextcloud30Packages.apps) mail calendar contacts cospend phonetrack polls tasks;
inherit (pkgs.nextcloud30Packages.apps) mail calendar contacts cospend phonetrack polls tasks sociallogin;
};
extraAppsEnable = true;
config = {
adminuser = "admin";
adminpassFile = config.sops.secrets.nextcloudadminpass.path;
@ -31,7 +42,7 @@
nginx = {
virtualHosts = {
"stash.swarsel.win" = {
"${nextcloudDomain}" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;