Skip to content

Instantly share code, notes, and snippets.

@dmjio

dmjio/box.nix Secret

Created October 20, 2018 21:54
Show Gist options
  • Save dmjio/284b4b8b4e500740bd33b0f5d019d699 to your computer and use it in GitHub Desktop.
Save dmjio/284b4b8b4e500740bd33b0f5d019d699 to your computer and use it in GitHub Desktop.
let
region = "us-east-1";
accessKeyId = "dev";
instanceType = "t2.small";
awsBox = { pkgs, config, lib, resources, ... }: {
imports = [ ../blab.nix ../modules/papertrail.nix ];
networking.firewall.allowedTCPPorts = [ 80 22 443 ];
services.openssh.enable = true;
deployment = {
targetEnv = "ec2";
ec2 = {
hvm = true;
inherit accessKeyId region instanceType;
inherit (resources.ec2KeyPairs) keyPair;
};
};
nginx = {
enable = true;
};
};
in {
inherit awsBox;
resources.ec2KeyPairs.keyPair = { inherit region accessKeyId; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment