Merge pull request #91149 from nlewo/nextcloud-expose-occ
nixos/nextcloud: add occ internal option
This commit is contained in:
commit
c9462630bd
@ -303,6 +303,14 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
occ = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = occ;
|
||||||
|
internal = true;
|
||||||
|
description = ''
|
||||||
|
The nextcloud-occ program preconfigured to target this Nextcloud instance.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
@ -26,7 +26,9 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nextcloud = { config, pkgs, ... }: {
|
nextcloud = { config, pkgs, ... }: let
|
||||||
|
cfg = config;
|
||||||
|
in {
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
@ -42,6 +44,8 @@ in {
|
|||||||
startAt = "20:00";
|
startAt = "20:00";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ cfg.services.nextcloud.occ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -67,6 +71,8 @@ in {
|
|||||||
in ''
|
in ''
|
||||||
start_all()
|
start_all()
|
||||||
nextcloud.wait_for_unit("multi-user.target")
|
nextcloud.wait_for_unit("multi-user.target")
|
||||||
|
# This is just to ensure the nextcloud-occ program is working
|
||||||
|
nextcloud.succeed("nextcloud-occ status")
|
||||||
nextcloud.succeed("curl -sSf http://nextcloud/login")
|
nextcloud.succeed("curl -sSf http://nextcloud/login")
|
||||||
nextcloud.succeed(
|
nextcloud.succeed(
|
||||||
"${withRcloneEnv} ${copySharedFile}"
|
"${withRcloneEnv} ${copySharedFile}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user