diff --git a/morph/lib/base.nix b/morph/lib/base.nix index f6a9a5f008681df23487f0f065ec4b9b8f982067..7390654ac167909149b0a6f4dfae897b8f3f43a3 100644 --- a/morph/lib/base.nix +++ b/morph/lib/base.nix @@ -20,8 +20,12 @@ }; }; + # Any extra NixOS modules to load on all our servers. Note that just + # because they're loaded doesn't *necessarily* mean they're turned on. imports = [ - ../../nixos/modules/packages.nix + # This brings in various other modules that define options for different + # areas of the service. + ../../nixos/modules/default.nix ]; config = { diff --git a/morph/lib/issuer.nix b/morph/lib/issuer.nix index 34b19e31fc7caf2a99311a8ce4c1a739934c0453..925d2bbf25654432efcd628819647904844116d3 100644 --- a/morph/lib/issuer.nix +++ b/morph/lib/issuer.nix @@ -45,7 +45,6 @@ in { }; imports = [ - ../../nixos/modules/issuer.nix ../../nixos/modules/monitoring/vpn/client.nix ../../nixos/modules/monitoring/exporters/node.nix ]; diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix new file mode 100644 index 0000000000000000000000000000000000000000..1772d399639aa8b4ec2c9ac6a218c4dd8a6169da --- /dev/null +++ b/nixos/modules/default.nix @@ -0,0 +1,16 @@ +{ + # Load modules that are sometimes universally useful and other times useful + # only for a specific service. Where functionality is not universally + # useful, it needs to be enabled by a node's configuration. By loading more + # modules (and therefore defining more options) than is strictly necessary + # for any single node the logic for supplying conditional configuration + # elsewhere is much simplified. For example, a Vagrant module can + # unconditionally set up a filesystem for PaymentServer. If PaymentServer + # is running on that node then it will get a Vagrant-appropriate + # configuration. If PaymentServer hasn't been enabled then the + # configuration will just be ignored. + imports = [ + ./packages.nix + ./issuer.nix + ]; +}