Merge pull request #326047 from britter/britter/onlyoffice-typos

onlyoffice: typo fixes, remove top level `with lib;`
This commit is contained in:
Masum Reza 2024-07-10 15:01:05 +05:30 committed by GitHub
commit 025f6d60e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,24 +1,22 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
with lib;
let let
cfg = config.services.onlyoffice; cfg = config.services.onlyoffice;
in in
{ {
options.services.onlyoffice = { options.services.onlyoffice = {
enable = mkEnableOption "OnlyOffice DocumentServer"; enable = lib.mkEnableOption "OnlyOffice DocumentServer";
enableExampleServer = mkEnableOption "OnlyOffice example server"; enableExampleServer = lib.mkEnableOption "OnlyOffice example server";
hostname = mkOption { hostname = lib.mkOption {
type = types.str; type = lib.types.str;
default = "localhost"; default = "localhost";
description = "FQDN for the onlyoffice instance."; description = "FQDN for the OnlyOffice instance.";
}; };
jwtSecretFile = mkOption { jwtSecretFile = lib.mkOption {
type = types.nullOr types.str; type = lib.types.nullOr lib.types.str;
default = null; default = null;
description = '' description = ''
Path to a file that contains the secret to sign web requests using JSON Web Tokens. Path to a file that contains the secret to sign web requests using JSON Web Tokens.
@ -26,34 +24,34 @@ in
''; '';
}; };
package = mkPackageOption pkgs "onlyoffice-documentserver" { }; package = lib.mkPackageOption pkgs "onlyoffice-documentserver" { };
port = mkOption { port = lib.mkOption {
type = types.port; type = lib.types.port;
default = 8000; default = 8000;
description = "Port the OnlyOffice DocumentServer should listens on."; description = "Port the OnlyOffice document server should listen on.";
}; };
examplePort = mkOption { examplePort = lib.mkOption {
type = types.port; type = lib.types.port;
default = null; default = null;
description = "Port the OnlyOffice Example server should listens on."; description = "Port the OnlyOffice example server should listen on.";
}; };
postgresHost = mkOption { postgresHost = lib.mkOption {
type = types.str; type = lib.types.str;
default = "/run/postgresql"; default = "/run/postgresql";
description = "The Postgresql hostname or socket path OnlyOffice should connect to."; description = "The Postgresql hostname or socket path OnlyOffice should connect to.";
}; };
postgresName = mkOption { postgresName = lib.mkOption {
type = types.str; type = lib.types.str;
default = "onlyoffice"; default = "onlyoffice";
description = "The name of database OnlyOffice should user."; description = "The name of database OnlyOffice should use.";
}; };
postgresPasswordFile = mkOption { postgresPasswordFile = lib.mkOption {
type = types.nullOr types.str; type = lib.types.nullOr lib.types.str;
default = null; default = null;
description = '' description = ''
Path to a file that contains the password OnlyOffice should use to connect to Postgresql. Path to a file that contains the password OnlyOffice should use to connect to Postgresql.
@ -61,8 +59,8 @@ in
''; '';
}; };
postgresUser = mkOption { postgresUser = lib.mkOption {
type = types.str; type = lib.types.str;
default = "onlyoffice"; default = "onlyoffice";
description = '' description = ''
The username OnlyOffice should use to connect to Postgresql. The username OnlyOffice should use to connect to Postgresql.
@ -70,8 +68,8 @@ in
''; '';
}; };
rabbitmqUrl = mkOption { rabbitmqUrl = lib.mkOption {
type = types.str; type = lib.types.str;
default = "amqp://guest:guest@localhost:5672"; default = "amqp://guest:guest@localhost:5672";
description = "The Rabbitmq in amqp URI style OnlyOffice should connect to."; description = "The Rabbitmq in amqp URI style OnlyOffice should connect to.";
}; };
@ -80,10 +78,10 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services = { services = {
nginx = { nginx = {
enable = mkDefault true; enable = lib.mkDefault true;
# misses text/csv, font/ttf, application/x-font-ttf, application/rtf, application/wasm # misses text/csv, font/ttf, application/x-font-ttf, application/rtf, application/wasm
recommendedGzipSettings = mkDefault true; recommendedGzipSettings = lib.mkDefault true;
recommendedProxySettings = mkDefault true; recommendedProxySettings = lib.mkDefault true;
upstreams = { upstreams = {
# /etc/nginx/includes/http-common.conf # /etc/nginx/includes/http-common.conf