Merge pull request #58181 from fgaz/nixos/zeronet/fix1
nixos/zeronet: add fileserverPort option
This commit is contained in:
commit
21fe4fd176
|
@ -5,13 +5,15 @@ let
|
||||||
|
|
||||||
zConfFile = pkgs.writeTextFile {
|
zConfFile = pkgs.writeTextFile {
|
||||||
name = "zeronet.conf";
|
name = "zeronet.conf";
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
[global]
|
[global]
|
||||||
data_dir = ${cfg.dataDir}
|
data_dir = ${cfg.dataDir}
|
||||||
log_dir = ${cfg.logDir}
|
log_dir = ${cfg.logDir}
|
||||||
'' + lib.optionalString (cfg.port != null) ''
|
'' + lib.optionalString (cfg.port != null) ''
|
||||||
ui_port = ${toString cfg.port}
|
ui_port = ${toString cfg.port}
|
||||||
|
'' + lib.optionalString (cfg.fileserverPort != null) ''
|
||||||
|
fileserver_port = ${toString cfg.fileserverPort}
|
||||||
'' + lib.optionalString (cfg.torAlways) ''
|
'' + lib.optionalString (cfg.torAlways) ''
|
||||||
tor = always
|
tor = always
|
||||||
'' + cfg.extraConfig;
|
'' + cfg.extraConfig;
|
||||||
|
@ -41,6 +43,15 @@ in with lib; {
|
||||||
description = "Optional zeronet web UI port.";
|
description = "Optional zeronet web UI port.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileserverPort = mkOption {
|
||||||
|
# Not optional: when absent zeronet tries to write one to the
|
||||||
|
# read-only config file and crashes
|
||||||
|
type = types.int;
|
||||||
|
default = 12261;
|
||||||
|
example = 12261;
|
||||||
|
description = "Zeronet fileserver port.";
|
||||||
|
};
|
||||||
|
|
||||||
tor = mkOption {
|
tor = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
Loading…
Reference in New Issue