Compare commits
No commits in common. "9dde0d319fc492944a09990a708670b53b09e199" and "bc63307993fef786c0730252eed2a4fa444eb757" have entirely different histories.
9dde0d319f
...
bc63307993
2 changed files with 13 additions and 34 deletions
|
@ -37,20 +37,10 @@ in
|
||||||
default = "seafile";
|
default = "seafile";
|
||||||
description = "Database user name. Not required for sqlite.";
|
description = "Database user name. Not required for sqlite.";
|
||||||
};
|
};
|
||||||
dbnameSeafile = mkOption {
|
dbname = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = "seafile";
|
default = "seafile";
|
||||||
description = "Database name for Seafile server. Not required for sqlite.";
|
description = "Database name. Not required for sqlite.";
|
||||||
};
|
|
||||||
dbnameCcnet = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = "seafile";
|
|
||||||
description = "Database name for Ccnet server. Not required for sqlite.";
|
|
||||||
};
|
|
||||||
dbnameSeahub = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = "seafile";
|
|
||||||
description = "Database name for Seahub web interface. Not required for sqlite.";
|
|
||||||
};
|
};
|
||||||
passwordFile = mkOption {
|
passwordFile = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
|
@ -84,11 +74,11 @@ in
|
||||||
description = "Group account under which the Seafile server runs.";
|
description = "Group account under which the Seafile server runs.";
|
||||||
};
|
};
|
||||||
|
|
||||||
name = mkOption {
|
# name = mkOption {
|
||||||
type = types.str;
|
# type = types.str;
|
||||||
default = "Seafile";
|
# default = "Seafile";
|
||||||
description = "name of the Seafile instance, will show up in client and web interface";
|
# description = "name of the Seafile instance, will show up in client and web interface";
|
||||||
};
|
# };
|
||||||
|
|
||||||
domainName = mkOption {
|
domainName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -249,7 +239,7 @@ in
|
||||||
echo "[General]" > ./conf/ccnet.conf
|
echo "[General]" > ./conf/ccnet.conf
|
||||||
grep "^ID =" ./ccnet/ccnet.conf.template >> ./conf/ccnet.conf
|
grep "^ID =" ./ccnet/ccnet.conf.template >> ./conf/ccnet.conf
|
||||||
# outside URL
|
# outside URL
|
||||||
SERVICE_URL="http${if cfg.enableTLS then "s" else ""}://${cfg.domainName}:${toString cfg.externalPort}"
|
SERVICE_URL = http${if cfg.enableTLS then "s" else ""}://${cfg.domainName}:${toString cfg.externalPort}
|
||||||
|
|
||||||
# seafile.conf generation
|
# seafile.conf generation
|
||||||
|
|
||||||
|
@ -264,19 +254,8 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ln -sf ${pkgs.seafile-server} seafile-server
|
ln -s ${pkgs.seafile-server} seafile-server
|
||||||
./seafile-server/setup-seafile-mysql.sh \
|
./seafile-server/seafile-server-latest/bin/seafile-admin setup
|
||||||
-n "${cfg.name}" \
|
|
||||||
-i "${cfg.domainName}" \
|
|
||||||
-p "${toString cfg.fileserverPort}" \
|
|
||||||
-d "${cfg.storagePath}" \
|
|
||||||
-o "${cfg.db.host}" \
|
|
||||||
-t "${toString cfg.db.dbport}" \
|
|
||||||
-u "${cfg.db.user}" \
|
|
||||||
-w "$DBPASS" \
|
|
||||||
-c "${cfg.db.dbnameCcnet}" \
|
|
||||||
-s "${cfg.db.dbnameSeafile}" \
|
|
||||||
-b "${cfg.db.dbnameSeahub}"
|
|
||||||
''}")
|
''}")
|
||||||
];
|
];
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
, python3Packages
|
, python3Packages
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "8.0.2";
|
version = "8.0.1";
|
||||||
python = python3;
|
python = python3;
|
||||||
pythonPackages = python3Packages;
|
pythonPackages = python3Packages;
|
||||||
django = pythonPackages.django;
|
django = pythonPackages.django;
|
||||||
|
@ -56,7 +56,7 @@ let
|
||||||
owner = "haiwen";
|
owner = "haiwen";
|
||||||
repo = "seafile-server";
|
repo = "seafile-server";
|
||||||
rev = "v${version}-server";
|
rev = "v${version}-server";
|
||||||
sha256 = "09zzgygyxgfdx7mjzcvww7c0gv82cmfgbscssyy886sbmjw2d9kc";
|
sha256 = "0brjmibg1vd1v6f2ybl1xr0ivf5kc8qg7fy4h204adnc0wkvjkrf";
|
||||||
};
|
};
|
||||||
# patch to work with latest, non-vulnerable libevhtp
|
# patch to work with latest, non-vulnerable libevhtp
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -92,7 +92,7 @@ let
|
||||||
owner = "haiwen";
|
owner = "haiwen";
|
||||||
repo = "seahub";
|
repo = "seahub";
|
||||||
rev = "v${version}-server";
|
rev = "v${version}-server";
|
||||||
sha256 = "0967nx6qk6dpk2lxydn6qzi8fwym5s0yfqja7sdh48ksk77v9hiq";
|
sha256 = "16lf88j6sjxm5scx4db4bljsbksv27xr6w9rcvcnjba0fkabrlir";
|
||||||
};
|
};
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
|
||||||
buildInputs = [ python pythonPackages.wrapPython ];
|
buildInputs = [ python pythonPackages.wrapPython ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue