44 lines
1003 B
Nix
44 lines
1003 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.naxos.apps.nextcloud;
|
|
in {
|
|
options.services.naxos.apps.nextcloud = {
|
|
enable = mkEnableOption "Nextcloud Personal Cloud & Collaboration Platform";
|
|
|
|
hostName = mkOption {
|
|
type = types.str;
|
|
default = "cloud.local";
|
|
description = "Domain / hostname for Nextcloud.";
|
|
};
|
|
|
|
homeDir = mkOption {
|
|
type = types.str;
|
|
default = "/tank/data/nextcloud";
|
|
description = "Persistent data directory on ZFS storage.";
|
|
};
|
|
|
|
adminpassFile = mkOption {
|
|
type = types.nullOr types.str;
|
|
default = null;
|
|
description = "Path to file containing initial admin password.";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.nextcloud = {
|
|
enable = true;
|
|
hostName = cfg.hostName;
|
|
home = cfg.homeDir;
|
|
config = {
|
|
adminuser = "admin";
|
|
adminpassFile = cfg.adminpassFile;
|
|
dbtype = "sqlite";
|
|
};
|
|
caching.redis = true;
|
|
};
|
|
};
|
|
}
|