diff --git a/morph/grid.nix b/morph/grid.nix index c6de769a64ba686c5056f5d3ccf2e033c509fe67..2c3aabec9a8bf23cda8c1225c86345036c7178e1 100644 --- a/morph/grid.nix +++ b/morph/grid.nix @@ -19,6 +19,9 @@ import ./make-grid.nix { # Pass the whole grid configuration to the module and let it take what it # wants. - "storage000" = import ./storage000.nix cfg; + "storage000" = import ./make-storage.nix ({ + cfg = import ./storage000-config.nix; + hardware = ./storage000-hardware.nix; + } // cfg); }; } diff --git a/morph/storage000.nix b/morph/make-storage.nix similarity index 80% rename from morph/storage000.nix rename to morph/make-storage.nix index cd2b6c1fbb057852ee924fe7efe41973d3b9dfc6..97c6d89bef76cfadde510e8553833d366a7f2335 100644 --- a/morph/storage000.nix +++ b/morph/make-storage.nix @@ -1,12 +1,9 @@ -let - # Get the configuration that's specific to this node. - cfg = import ./storage000-config.nix; -in -# 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, ristrettoSigningKeyPath, ... }: rec { - +# Define the function that defines the node. +{ cfg # Get the configuration that's specific to this node. +, hardware # The path to the hardware configuration for this node. +, publicStoragePort # The storage port number on which to accept connections. +, ristrettoSigningKeyPath # The *local* path to the Ristretto signing key file. +}: rec { deployment = { secrets = { "ristretto-signing-key" = { @@ -26,7 +23,7 @@ in # Any extra NixOS modules to load on this server. imports = [ # Include the results of the hardware scan. - ./storage000-hardware.nix + hardware # Configure it as a system operated by 100TB. ../nixos/modules/100tb.nix # Bring in our module for configuring the Tahoe-LAFS service and other @@ -58,5 +55,5 @@ in # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you # should. - system.stateVersion = "19.03"; # Did you read the comment? + system.stateVersion = "19.09"; # Did you read the comment? }