-
-
Save exarkun/a37bc775609f4cf5c7ba21cfbf8fff22 to your computer and use it in GitHub Desktop.
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
let | |
region = "eu-west-1"; | |
accessKeyId = "dev"; | |
webserver = | |
{ config, pkgs, resources, ... }: | |
{ deployment.targetEnv = "ec2"; | |
deployment.ec2.accessKeyId = "dev"; | |
deployment.ec2.region = region; | |
deployment.ec2.instanceType = "t3.small"; | |
deployment.ec2.keyPair = resources.ec2KeyPairs.my-key-pair; | |
}; | |
in | |
{ | |
webserver = webserver; | |
resources.ec2KeyPairs.my-key-pair = | |
{ inherit region accessKeyId; }; | |
} |
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
{ | |
network.description = "Web server"; | |
webserver = | |
{ config, pkgs, ... }: | |
{ services.httpd.enabled = true; | |
services.httpd.adminAddr = "alice@example.com"; | |
services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html"; | |
networking.firewall.allowedTCPPorts = [ 80 ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment