Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Dec 2, 2013
2 parents 7b635e9 + 2a8e3d9 commit f491163
Show file tree
Hide file tree
Showing 28 changed files with 540 additions and 137 deletions.
8 changes: 4 additions & 4 deletions nix/adhoc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

deployment.adhoc.controller = mkOption {
example = "cloud.example.org";
type = types.uniq types.string;
type = types.str;
description = ''
Hostname or IP addres of the machine to which NixOps should
connect (via SSH) to execute commands to start VMs or query
Expand All @@ -18,7 +18,7 @@

deployment.adhoc.createVMCommand = mkOption {
default = "create-vm";
type = types.uniq types.string;
type = types.str;
description = ''
Remote command to create a NixOS virtual machine. It should
print an identifier denoting the VM on standard output.
Expand All @@ -27,7 +27,7 @@

deployment.adhoc.destroyVMCommand = mkOption {
default = "destroy-vm";
type = types.uniq types.string;
type = types.str;
description = ''
Remote command to destroy a previously created NixOS virtual
machine.
Expand All @@ -36,7 +36,7 @@

deployment.adhoc.queryVMCommand = mkOption {
default = "query-vm";
type = types.uniq types.string;
type = types.str;
description = ''
Remote command to query information about a previously created
NixOS virtual machine. It should print the IPv6 address of
Expand Down
8 changes: 4 additions & 4 deletions nix/auto-luks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ with utils;

options.device = mkOption {
example = "/dev/xvdg";
type = types.uniq types.string;
type = types.str;
description = ''
The underlying (encrypted) device.
'';
};

options.cipher = mkOption {
default = "aes-cbc-essiv:sha256";
type = types.uniq types.string;
type = types.str;
description = ''
The cipher used to encrypt the volume.
'';
};

options.keySize = mkOption {
default = 128;
type = types.uniq types.int;
type = types.int;
description = ''
The size in bits of the encryption key.
'';
};

options.passphrase = mkOption {
default = "";
type = types.uniq types.string;
type = types.str;
description = ''
The passphrase (key file) used to decrypt the key to access
the volume. If left empty, a passphrase is generated
Expand Down
2 changes: 1 addition & 1 deletion nix/auto-raid0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ with utils;

options.devices = mkOption {
example = [ "/dev/xvdg" "/dev/xvdh" ];
type = types.listOf types.string;
type = types.listOf types.str;
description = "The underlying devices to be combined into a RAID-0 volume.";
};

Expand Down
46 changes: 46 additions & 0 deletions nix/ebs-volume.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{ config, pkgs, uuid, name, ... }:

with pkgs.lib;

{

options = {

name = mkOption {
example = "My Big Fat Disk";
default = "nixops-${uuid}-${name}";
type = types.str;
description = "Description of the EBS volume. This is the <literal>Name</literal> tag of the disk.";
};

region = mkOption {
example = "us-east-1";
type = types.str;
description = "Amazon EC2 region.";
};

zone = mkOption {
example = "us-east-1c";
type = types.str;
description = ''
The EC2 availability zone in which the volume should be
created.
'';
};

accessKeyId = mkOption {
type = types.str;
description = "The AWS Access Key ID.";
};

size = mkOption {
example = 100;
type = types.int;
description = "Volume size (in gigabytes).";
};

};

config._type = "ebs-volume";

}
8 changes: 5 additions & 3 deletions nix/ec2-keypair.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ with pkgs.lib;

name = mkOption {
default = "charon-${uuid}-${name}";
type = types.uniq types.string;
type = types.str;
description = "Name of the EC2 key pair.";
};

region = mkOption {
type = types.uniq types.string;
type = types.str;
description = "Amazon EC2 region.";
};

accessKeyId = mkOption {
default = "";
type = types.uniq types.string;
type = types.str;
description = "The AWS Access Key ID.";
};

};

config._type = "ec2-keypair";

}
38 changes: 19 additions & 19 deletions nix/ec2-security-group.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,86 +8,86 @@ with pkgs.lib;

name = mkOption {
default = "charon-${uuid}-${name}";
type = types.uniq types.string;
type = types.str;
description = "Name of the security group.";
};

description = mkOption {
default = "nixops-provisioned group ${name}";
type = types.string;
description = "Informational description of the security group";
type = types.str;
description = "Informational description of the security group.";
};

region = mkOption {
type = types.uniq types.string;
type = types.str;
description = "Amazon EC2 region.";
};

accessKeyId = mkOption {
default = "";
type = types.uniq types.string;
type = types.str;
description = "The AWS Access Key ID.";
};

groupId = mkOption {
default = null;
type = types.uniq (types.nullOr types.string);
type = types.uniq (types.nullOr types.str);
description = "The security group ID. This is set by NixOps.";
};

rules = mkOption {
type = types.listOf types.optionSet;
description = "The security group's rules";
description = "The security group's rules.";
default = {};
options = {
protocol = mkOption {
default = "tcp";
description = "The protocol (tcp, udp, or icmp) that this rule describes";
type = types.uniq types.string;
description = "The protocol (tcp, udp, or icmp) that this rule describes.";
type = types.str;
};

fromPort = mkOption {
default = null;
description = "The bottom of the allowed port range for this rule (TCP/UDP only)";
description = "The bottom of the allowed port range for this rule (TCP/UDP only).";
type = types.uniq (types.nullOr types.int);
};

toPort = mkOption {
default = null;
description = "The top of the allowed port range for this rule (TCP/UDP only)";
description = "The top of the allowed port range for this rule (TCP/UDP only).";
type = types.uniq (types.nullOr types.int);
};

typeNumber = mkOption {
default = null;
description = "ICMP type number (ICMP only, -1 for all)";
description = "ICMP type number (ICMP only, -1 for all).";
type = types.uniq (types.nullOr types.int);
};

codeNumber = mkOption {
default = null;
description = "ICMP code number (ICMP only, -1 for all)";
description = "ICMP code number (ICMP only, -1 for all).";
type = types.uniq (types.nullOr types.int);
};

sourceGroup = {
ownerId = mkOption {
default = null;
description = "The AWS account ID that owns the source security group";
type = types.uniq (types.nullOr types.string);
description = "The AWS account ID that owns the source security group.";
type = types.uniq (types.nullOr types.str);
};

groupName = mkOption {
default = null;
description = "The name of the source security group (if allowing all instances in a group access instead of an IP range)";
type = types.uniq (types.nullOr types.string);
description = "The name of the source security group (if allowing all instances in a group access instead of an IP range).";
type = types.uniq (types.nullOr types.str);
};
};

sourceIp = mkOption {
default = null;
description = "The source IP range (CIDR notation)";
type = types.uniq (types.nullOr types.string);
description = "The source IP range (CIDR notation).";
type = types.uniq (types.nullOr types.str);
};
};
};
Expand Down
Loading

0 comments on commit f491163

Please sign in to comment.