From 41f4784e652a179ce0bcad662c7b00f3f35e50d2 Mon Sep 17 00:00:00 2001 From: Fritz Otlinghaus Date: Sun, 24 Jan 2021 12:27:35 +0100 Subject: bacula: add types --- nixos/modules/services/backup/bacula.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nixos/modules/services/backup/bacula.nix b/nixos/modules/services/backup/bacula.nix index b485602aab8..cc8b77cbfbe 100644 --- a/nixos/modules/services/backup/bacula.nix +++ b/nixos/modules/services/backup/bacula.nix @@ -1,5 +1,6 @@ { config, lib, pkgs, ... }: + # TODO: test configuration when building nixexpr (use -t parameter) # TODO: support sqlite3 (it's deprecate?) and mysql @@ -111,6 +112,7 @@ let { options = { password = mkOption { + type = types.str; # TODO: required? description = '' Specifies the password that must be supplied for the default Bacula @@ -130,6 +132,7 @@ let }; monitor = mkOption { + type = types.enum [ "no" "yes" ]; default = "no"; example = "yes"; description = '' @@ -150,6 +153,7 @@ let { options = { changerDevice = mkOption { + type = types.str; description = '' The specified name-string must be the generic SCSI device name of the autochanger that corresponds to the normal read/write Archive Device @@ -168,6 +172,7 @@ let }; changerCommand = mkOption { + type = types.str; description = '' The name-string specifies an external program to be called that will automatically change volumes as required by Bacula. Normally, this @@ -191,10 +196,12 @@ let devices = mkOption { description = ""; + type = types.listOf types.str; }; extraAutochangerConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Autochanger directive. ''; @@ -211,6 +218,7 @@ let options = { archiveDevice = mkOption { # TODO: required? + type = types.str; description = '' The specified name-string gives the system file name of the storage device managed by this storage daemon. This will usually be the @@ -227,6 +235,7 @@ let mediaType = mkOption { # TODO: required? + type = types.str; description = '' The specified name-string names the type of media supported by this device, for example, DLT7000. Media type names are @@ -264,6 +273,7 @@ let extraDeviceConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Device directive. ''; @@ -292,6 +302,7 @@ in { name = mkOption { default = "${config.networking.hostName}-fd"; + type = types.str; description = '' The client name that must be used by the Director when connecting. Generally, it is a good idea to use a name related to the machine so @@ -320,6 +331,7 @@ in { extraClientConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Client directive. ''; @@ -331,6 +343,7 @@ in { extraMessagesConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Messages directive. ''; @@ -351,6 +364,7 @@ in { name = mkOption { default = "${config.networking.hostName}-sd"; + type = types.str; description = '' Specifies the Name of the Storage daemon. ''; @@ -391,6 +405,7 @@ in { extraStorageConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Storage directive. ''; @@ -402,6 +417,7 @@ in { extraMessagesConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Messages directive. ''; @@ -423,6 +439,7 @@ in { name = mkOption { default = "${config.networking.hostName}-dir"; + type = types.str; description = '' The director name used by the system administrator. This directive is required. @@ -444,6 +461,7 @@ in { password = mkOption { # TODO: required? + type = types.str; description = '' Specifies the password that must be supplied for a Director. ''; @@ -451,6 +469,7 @@ in { extraMessagesConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Messages directive. ''; @@ -461,6 +480,7 @@ in { extraDirectorConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration to be passed in Director directive. ''; -- cgit 1.4.1