Skip to content

Commit

Permalink
nextcloud: deprecate nginx, use chgrp, mkDefault for nginx, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavHau committed Aug 3, 2020
1 parent b90a70d commit ca916e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
12 changes: 9 additions & 3 deletions nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ let
inherit (config.system) stateVersion;

in {

imports = [
( mkRemovedOptionModule [ "services" "nextcloud" "nginx" "enable" ]
"The nextcloud module dropped support for other webservers than nginx.")
];

options.services.nextcloud = {
enable = mkEnableOption "nextcloud";
hostName = mkOption {
Expand Down Expand Up @@ -465,7 +471,7 @@ in {
if [ ! -e $dir ]; then
install -o nextcloud -g nextcloud -d $dir
elif [ $(stat -c "%G" $dir) != "nextcloud" ]; then
chown -R nextcloud:nextcloud $dir
chgrp -R nextcloud $dir
fi
done
Expand Down Expand Up @@ -524,8 +530,8 @@ in {
users.groups.nextcloud.members = [ "nextcloud" config.services.nginx.user ];

environment.systemPackages = [ occ ];
services.nginx.enable = true;

services.nginx.enable = mkDefault true;
services.nginx.virtualHosts.${cfg.hostName} = {
root = cfg.package;
locations = {
Expand Down
1 change: 0 additions & 1 deletion nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ in {

services.nextcloud = {
enable = true;
nginx.enable = true;
hostName = "nextcloud";
config = {
# Don't inherit adminuser since "root" is supposed to be the default
Expand Down
1 change: 0 additions & 1 deletion nixos/tests/nextcloud/with-mysql-and-memcached.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ in {
services.nextcloud = {
enable = true;
hostName = "nextcloud";
nginx.enable = true;
https = true;
caching = {
apcu = true;
Expand Down
1 change: 0 additions & 1 deletion nixos/tests/nextcloud/with-postgresql-and-redis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ in {
services.nextcloud = {
enable = true;
hostName = "nextcloud";
nginx.enable = true;
caching = {
apcu = false;
redis = true;
Expand Down

0 comments on commit ca916e8

Please sign in to comment.