summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPascal Wittmann <mail@pascal-wittmann.de>2015-07-08 19:14:36 +0200
committerPascal Wittmann <mail@pascal-wittmann.de>2015-07-08 19:14:36 +0200
commitc0de3b306be36d7e1f491998c9c096973a430121 (patch)
tree4ec35f8356201c2f0cc5d709d8a9d12c5d573c07 /nixos
parent1f2388044930c05c61584bf7a4bdec7a63ef02f4 (diff)
downloadnixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar.gz
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar.bz2
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar.lz
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar.xz
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.tar.zst
nixpkgs-c0de3b306be36d7e1f491998c9c096973a430121.zip
nixos/bitlbee: add hostname, config dir and protocols options
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/bitlbee.nix32
1 files changed, 31 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix
index 7276603da16..ca2fff91704 100644
--- a/nixos/modules/services/networking/bitlbee.nix
+++ b/nixos/modules/services/networking/bitlbee.nix
@@ -17,10 +17,12 @@ let
     [settings]
     RunMode = Daemon
     User = bitlbee  
-    ConfigDir = /var/lib/bitlbee      
+    ConfigDir = ${cfg.configDir}
     DaemonInterface = ${cfg.interface}
     DaemonPort = ${toString cfg.portNumber}
     AuthMode = ${cfg.authMode}
+    ${lib.optionalStringv (cfg.hostName != "") "HostName = ${cfg.hostName}"}
+    Protocols = ${cfg.protocols}
     ${cfg.extraSettings}
 
     [defaults]
@@ -73,6 +75,34 @@ in
         ''; 
       };
 
+      hostName = mkOption {
+        default = "";
+        type = types.str;
+        description = ''
+          Normally, BitlBee gets a hostname using getsockname(). If you have a nicer
+          alias for your BitlBee daemon, you can set it here and BitlBee will identify
+          itself with that name instead.
+        '';
+      };
+
+      configDir = mkOption {
+        default = "/var/lib/bitlbee";
+        type = types.path;
+        description = ''
+          Specify an alternative directory to store all the per-user configuration
+          files.
+        '';
+      };
+
+      protocols = mkOption {
+        default = "";
+        type = types.str;
+        description = ''
+          This option allows to remove the support of protocol, even if compiled
+          in. If nothing is given, there are no restrictions.
+        '';
+      };
+
       extraSettings = mkOption {
         default = "";
         description = ''