summary refs log tree commit diff
path: root/nixos/modules/services/networking/hylafax/default.nix
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2018-08-04 17:08:54 +0200
committerYarny0 <41838844+Yarny0@users.noreply.github.com>2018-09-08 14:21:40 +0200
commit12fa95f2d696b6babb365a27efef140e7113cc34 (patch)
tree85046edaf3247f85cce2dad2e31c56c881d2422c /nixos/modules/services/networking/hylafax/default.nix
parenta08b633fe7b636556ece29cc75448254b6ac3d28 (diff)
downloadnixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar.gz
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar.bz2
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar.lz
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar.xz
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.tar.zst
nixpkgs-12fa95f2d696b6babb365a27efef140e7113cc34.zip
modules: HylaFAX server configuration
This commit adds the following
* the uucp user
* options for HylaFAX server to control startup and modems
* systemd services for HylaFAX server processes
  including faxgettys for modems
* systemd services to maintain the HylaFAX spool area,
  including cleanup with faxcron and faxqclean
* default configuration for all server processes
  for a minimal working configuration

Some notes:

* HylaFAX configuration cannot be initialized with faxsetup
  (as it would be common on other Linux distributions).
  The hylafaxplus package contains a template spool area.
* Modems are controlled by faxgetty.
  Send-only configuration (modems controlled by faxq)
  is not supported by this configuration setup.
* To enable the service, one or more modems must be defined with
  config.services.hylafax.modems .
* Sending mail *should* work:
  HylaFAX will use whatever is in
  config.services.mail.sendmailSetuidWrapper.program
  unless overridden with the sendmailPath option.
* The admin has to create a hosts.hfaxd file somewhere
  (e.g. in /etc) before enabling HylaFAX.
  This file controls access to the server (see hosts.hfaxd(5) ).
  Sadly, HylaFAX does not permit account-based access
  control as is accepts connections via TCP only.
* Active fax polling should work; I can't test it.
* Passive fax polling is not supported by HylaFAX.
* Pager transmissions (with sendpage) are disabled by default.
  I have never tested or used these.
* Incoming data/voice/"extern"al calls
  won't be handled by default.
  I have never tested or used these.
Diffstat (limited to 'nixos/modules/services/networking/hylafax/default.nix')
-rw-r--r--nixos/modules/services/networking/hylafax/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/hylafax/default.nix b/nixos/modules/services/networking/hylafax/default.nix
new file mode 100644
index 00000000000..6e28e8c5d8b
--- /dev/null
+++ b/nixos/modules/services/networking/hylafax/default.nix
@@ -0,0 +1,29 @@
+{ config, lib, pkgs, ... }:
+
+{
+
+  imports = [
+    ./options.nix
+    ./systemd.nix
+  ];
+
+  config = lib.modules.mkIf config.services.hylafax.enable {
+    environment.systemPackages = [ pkgs.hylafaxplus ];
+    users.users.uucp = {
+      uid = config.ids.uids.uucp;
+      group = "uucp";
+      description = "Unix-to-Unix CoPy system";
+      isSystemUser = true;
+      inherit (config.users.users.nobody) home;
+    };
+    assertions = [{
+      assertion = config.services.hylafax.modems != {};
+      message = ''
+        HylaFAX cannot be used without modems.
+        Please define at least one modem with
+        <option>config.services.hylafax</option>.
+      '';
+    }];
+  };
+
+}