From 40fb90a2953bf870bfaa2b941fda744dd39a4878 Mon Sep 17 00:00:00 2001 From: Domen Kozar Date: Thu, 16 May 2013 21:58:24 +0200 Subject: [PATCH] bacula: generate bconsole config --- modules/services/backup/bacula.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/services/backup/bacula.nix b/modules/services/backup/bacula.nix index 05192f797fcd..a5f2c62fa05d 100644 --- a/modules/services/backup/bacula.nix +++ b/modules/services/backup/bacula.nix @@ -7,6 +7,7 @@ with pkgs.lib; let libDir = "/var/lib/bacula"; + fd_cfg = config.services.bacula-fd; fd_conf = pkgs.writeText "bacula-fd.conf" '' @@ -96,6 +97,17 @@ let ${dir_cfg.extraConfig} ''; + # TODO: by default use this config + bconsole_conf = pkgs.writeText "bconsole.conf" + '' + Director { + Name = ${dir_cfg.name}; + Address = "localhost"; + DirPort = ${toString dir_cfg.port}; + Password = "${dir_cfg.password}"; + } + ''; + directorOptions = {name, config, ...}: { options = {