From cd9ce8ee4ce51045e44a4b904a23796ba7e86c64 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 5 Sep 2019 10:03:41 -0400
Subject: [PATCH] a few more comments and formatting changes

---
 morph/storage000.nix | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/morph/storage000.nix b/morph/storage000.nix
index 72105b05..540229b5 100644
--- a/morph/storage000.nix
+++ b/morph/storage000.nix
@@ -1,16 +1,21 @@
 let
+  # Get the configuration that's specific to this node.
   cfg = import ./storage000-config.nix;
 in
-{ publicStoragePort, ... }:
-{
-  imports =
-    [ # Include the results of the hardware scan.
-      ./storage000-hardware.nix
-      # Configure it as a system operated by 100TB.
-      ../nixos/modules/100tb.nix
-      # Bring in our module for configuring the Tahoe-LAFS service and other
-      # Private Storage-specific things.
-      ../nixos/modules/private-storage.nix
+# Define the function that defines the node.  Accept the public storage server
+# port argument so we can configure Tahoe-LAFS with it.  Accept but ignore any
+# other arguments.
+{ publicStoragePort, ... }: {
+
+  # Any extra NixOS modules to load on this server.
+  imports = [
+    # Include the results of the hardware scan.
+    ./storage000-hardware.nix
+    # Configure it as a system operated by 100TB.
+    ../nixos/modules/100tb.nix
+    # Bring in our module for configuring the Tahoe-LAFS service and other
+    # Private Storage-specific things.
+    ../nixos/modules/private-storage.nix
    ];
 
   # Pass the configuration specific to this host to the 100TB module to be
@@ -22,8 +27,9 @@ in
   "100tb".config = cfg;
 
   # Turn on the Private Storage (Tahoe-LAFS) service.
-  services.private-storage =
-  { enable = true;
+  services.private-storage = {
+    # Yep.  Turn it on.
+    enable = true;
     # Get the public IPv4 address from the node configuration.
     inherit (cfg) publicIPv4;
     # And the port to operate on is specified via parameter.
-- 
GitLab