-
-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support a "defaults" attribute that sets default values for all machines
The "defaults" attribute in every network expressions is stacked on top of every machine configuration. Ideally the values defined in "defaults" would have a lower priority, but I don't think it's possible yet to set a default priority for all values in a NixOS module.
- Loading branch information
Showing
2 changed files
with
16 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
let | ||
|
||
config = | ||
{ | ||
defaults = | ||
{ config, pkgs, ... }: | ||
{ deployment.targetEnv = "ec2"; | ||
deployment.ec2.region = "us-east-1"; | ||
deployment.ec2.instanceType = "m1.large"; | ||
deployment.ec2.region = pkgs.lib.mkDefault "eu-west-1"; | ||
deployment.ec2.instanceType = "m1.small"; | ||
deployment.ec2.keyPair = "eelco"; | ||
deployment.ec2.securityGroups = [ "eelco-test" ]; | ||
}; | ||
|
||
in | ||
|
||
{ | ||
proxy = config; | ||
backend1 = config; | ||
backend2 = config; | ||
|
||
backend2.deployment.ec2.region = "us-west-1"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters