ccnet port and name config have been removed upstream
This commit is contained in:
parent
7b150eefa3
commit
69cf92ddbe
|
@ -73,22 +73,22 @@ in
|
|||
description = "Group account under which the Seafile server runs.";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Seafile";
|
||||
description = "name of the Seafile instance, will show up in client and web interface";
|
||||
};
|
||||
# name = mkOption {
|
||||
# type = types.str;
|
||||
# default = "Seafile";
|
||||
# description = "name of the Seafile instance, will show up in client and web interface";
|
||||
# };
|
||||
|
||||
domainName = mkOption {
|
||||
type = types.str;
|
||||
description = "full domain name of the seafile instance";
|
||||
};
|
||||
|
||||
ccnetPort = mkOption {
|
||||
type = types.int;
|
||||
default = 10001;
|
||||
description = "listening port for ccnet server";
|
||||
};
|
||||
# ccnetPort = mkOption {
|
||||
# type = types.int;
|
||||
# default = 10001;
|
||||
# description = "listening port for ccnet server";
|
||||
# };
|
||||
|
||||
seafilePort = mkOption {
|
||||
type = types.int;
|
||||
|
@ -197,21 +197,16 @@ in
|
|||
# ccnet-init must only be run once per installation, as it also generates stateful key and ID
|
||||
# solution: invoke it once, use result as template
|
||||
if [ ! -e ./ccnet/mykey.peer ]; then
|
||||
${pkgs.seafile-server.ccnet-server}/bin/ccnet-init -c ./ccnet -n 'TEMPLATENAME' -H 'TEMPLATEHOST' -P 'TEMPLATEPORT'
|
||||
${pkgs.seafile-server.ccnet-server}/bin/ccnet-init -c ./ccnet -H 'TEMPLATEHOST'
|
||||
mv ./ccnet/ccnet.conf{,.template}
|
||||
fi
|
||||
|
||||
# generate actual ccnet config file
|
||||
echo "[General]" > ./conf/ccnet.conf
|
||||
grep "^ID =" ./ccnet/ccnet.conf.template >> ./conf/ccnet.conf
|
||||
echo 'USER_NAME = ${cfg.name}
|
||||
NAME = ${cfg.name}
|
||||
# outside URL
|
||||
SERVICE_URL = http${if cfg.enableTLS then "s" else ""}://${cfg.domainName}:${toString cfg.externalPort}
|
||||
|
||||
[Network]
|
||||
Port = ${toString cfg.ccnetPort}' >> ./conf/ccnet.conf
|
||||
|
||||
# seafile.conf generation
|
||||
|
||||
echo '[library_trash]
|
||||
|
@ -280,6 +275,7 @@ in
|
|||
};
|
||||
users.groups.${cfg.group}.members = [ cfg.user ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = with cfg; if openFirewall then [ ccnetPort seafilePort fileserverPort ] else [];
|
||||
# ToDo: make sure ccnet is reachable
|
||||
networking.firewall.allowedTCPPorts = with cfg; if openFirewall then [ seafilePort fileserverPort ] else [];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue