mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-05-06 14:36:06 +02:00
9da0a143ae
Co-authored-by: Jill Monoids <oatmealine@disroot.org>
34 lines
638 B
Nix
34 lines
638 B
Nix
{ pkgs, config, lib, options, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.services.nextcloud;
|
|
in {
|
|
options.modules.services.nextcloud = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
|
|
domain = mkOption {
|
|
type = types.str;
|
|
default = null;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions = [
|
|
{ assertion = cfg.domain != null;
|
|
description = "Nextcloud requires a domain.";
|
|
}
|
|
];
|
|
|
|
services.nextcloud = {
|
|
enable = true;
|
|
package = pkgs.nextcloud24;
|
|
hostName = cfg.domain;
|
|
config.adminpassFile = "/etc/nextcloudpass";
|
|
};
|
|
};
|
|
}
|