diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-04-30 14:42:55 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-04-30 15:56:41 +0300 |
commit | 9be6c7b78f2a668aa1edcafa25c3dd1ba8ae6ad7 (patch) | |
tree | 8db0743d00f83406e38e2c2c192751c778fe54c9 /modules/apps/pgbackup.nix | |
parent | 49659d55878d09827566902d07d01f051926aff2 (diff) | |
download | nixsap-9be6c7b78f2a668aa1edcafa25c3dd1ba8ae6ad7.tar.gz |
(* BREAKING *) Avoid ambiguous options
"either foo (listOf foo)" was not very useful
and interfered proper merging.
Diffstat (limited to 'modules/apps/pgbackup.nix')
-rw-r--r-- | modules/apps/pgbackup.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/apps/pgbackup.nix b/modules/apps/pgbackup.nix index 099fe35..2cde338 100644 --- a/modules/apps/pgbackup.nix +++ b/modules/apps/pgbackup.nix @@ -2,20 +2,20 @@ let inherit (builtins) - elem isBool isList isString toString ; + elem isBool isList isString ; inherit (lib) concatMapStringsSep concatStringsSep filterAttrs - findFirst flatten hasPrefix mapAttrsToList mkIf + findFirst hasPrefix mapAttrsToList mkIf mkOption optionalString removeSuffix ; inherit (lib.types) - bool either enum int listOf nullOr path str submodule ; + bool enum int listOf nullOr path str submodule ; cfg = config.nixsap.apps.pgbackup; privateDir = "/run/pgbackup"; s3cmd = "${pkgs.s3cmd}/bin/s3cmd ${optionalString (cfg.s3cfg != null) "-c '${cfg.s3cfg}'"}"; - gpgPubKeys = flatten [ cfg.encrypt ]; + gpgPubKeys = cfg.encrypt; gpg = "${pkgs.gpg}/bin/gpg2"; pubring = pkgs.runCommand "pubring.kbx" {} '' ${gpg} --homedir . --import ${toString gpgPubKeys} @@ -35,9 +35,9 @@ let create = optional bool; data-only = optional bool; dbname = optional str; - exclude-schema = optional (either str (listOf str)); - exclude-table = optional (either str (listOf str)); - exclude-table-data = optional (either str (listOf str)); + exclude-schema = optional (listOf str); + exclude-table = optional (listOf str); + exclude-table-data = optional (listOf str); format = default "plain" (enum ["plain" "custom" "directory" "tar"]); host = optional str; if-exists = optional bool; @@ -47,10 +47,10 @@ let port = optional int; quote-all-identifiers = optional bool; role = optional str; - schema = optional (either str (listOf str)); + schema = optional (listOf str); schema-only = optional bool; serializable-deferrable = optional bool; - table = optional (either str (listOf str)); + table = optional (listOf str); username = optional str; }; @@ -289,7 +289,7 @@ in { encrypt = mkOption { description = "Public GPG key(s) for encrypting the dumps"; default = [ ]; - type = either path (listOf path); + type = listOf path; }; s3cfg = mkOption { |