mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
nixos/invoiceplane: Remove deprecated extraConfig
This commit is contained in:
parent
619de33c2d
commit
4217b9cd9a
2 changed files with 4 additions and 29 deletions
|
@ -18,6 +18,9 @@
|
||||||
nvimpager settings: user commands in `-c` and `--cmd` now override the
|
nvimpager settings: user commands in `-c` and `--cmd` now override the
|
||||||
respective default settings because they are executed later.
|
respective default settings because they are executed later.
|
||||||
|
|
||||||
|
- The Invoiceplane module now only accepts the structured `settings` option.
|
||||||
|
`extraConfig` is now removed.
|
||||||
|
|
||||||
- Legacy package `stalwart-mail_0_6` was dropped, please note the
|
- Legacy package `stalwart-mail_0_6` was dropped, please note the
|
||||||
[manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md)
|
[manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md)
|
||||||
before changing the package to `pkgs.stalwart-mail` in
|
before changing the package to `pkgs.stalwart-mail` in
|
||||||
|
|
|
@ -39,10 +39,7 @@ let
|
||||||
|
|
||||||
extraConfig = hostName: cfg: let
|
extraConfig = hostName: cfg: let
|
||||||
settings = mapAttrsToList (k: v: "${k}=${mkPhpValue v}") cfg.settings;
|
settings = mapAttrsToList (k: v: "${k}=${mkPhpValue v}") cfg.settings;
|
||||||
in pkgs.writeText "extraConfig.php" ''
|
in pkgs.writeText "extraConfig.php" (concatStringsSep "\n" settings);
|
||||||
${concatStringsSep "\n" settings}
|
|
||||||
${toString cfg.extraConfig}
|
|
||||||
'';
|
|
||||||
|
|
||||||
pkg = hostName: cfg: pkgs.stdenv.mkDerivation rec {
|
pkg = hostName: cfg: pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "invoiceplane-${hostName}";
|
pname = "invoiceplane-${hostName}";
|
||||||
|
@ -182,25 +179,6 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
|
||||||
type = types.nullOr types.lines;
|
|
||||||
default = null;
|
|
||||||
example = ''
|
|
||||||
SETUP_COMPLETED=true
|
|
||||||
DISABLE_SETUP=true
|
|
||||||
IP_URL=https://invoice.example.com
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
InvoicePlane configuration. Refer to
|
|
||||||
<https://github.com/InvoicePlane/InvoicePlane/blob/master/ipconfig.php.example>
|
|
||||||
for details on supported values.
|
|
||||||
|
|
||||||
**Note**: Please pass structured settings via
|
|
||||||
`services.invoiceplane.sites.${name}.settings` instead, this option
|
|
||||||
will get deprecated in the future.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -269,12 +247,6 @@ in
|
||||||
# implementation
|
# implementation
|
||||||
config = mkIf (eachSite != {}) (mkMerge [{
|
config = mkIf (eachSite != {}) (mkMerge [{
|
||||||
|
|
||||||
warnings = flatten (mapAttrsToList (hostName: cfg: [
|
|
||||||
(optional (cfg.extraConfig != null) ''
|
|
||||||
services.invoiceplane.sites."${hostName}".extraConfig will be deprecated in future releases, please use the settings option now.
|
|
||||||
'')
|
|
||||||
]) eachSite);
|
|
||||||
|
|
||||||
assertions = flatten (mapAttrsToList (hostName: cfg: [
|
assertions = flatten (mapAttrsToList (hostName: cfg: [
|
||||||
{ assertion = cfg.database.createLocally -> cfg.database.user == user;
|
{ assertion = cfg.database.createLocally -> cfg.database.user == user;
|
||||||
message = ''services.invoiceplane.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
|
message = ''services.invoiceplane.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue