Merge pull request #110444 from helsinki-systems/bacula_types

nixos/bacula: adding types to all options
This commit is contained in:
Sandro 2021-01-26 00:51:18 +01:00 committed by GitHub
commit 896a3428ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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