git.iko.soy/typeable/nixpkgs
on master help sign in
Fix eval error due to config.ec2.hvm
35dbcbbEelco Dolstra
nixos/modules/virtualisation/amazon-image.nix+6
@@ -15,6 +15,12 @@ let cfg = config.ec2; in
15
15
16 config = {
16 config = {
17
17
18+ assertions = [
19+ { assertion = cfg.hvm;
20+ message = "Paravirtualized EC2 instances are no longer supported.";
21+ }
22+ ];
23+
18 virtualisation.growPartition = cfg.hvm;
24 virtualisation.growPartition = cfg.hvm;
19
25
20 fileSystems."/" = {
26 fileSystems."/" = {
nixos/modules/virtualisation/amazon-options.nix+1−9
@@ -3,7 +3,7 @@
3 options = {
3 options = {
4 ec2 = {
4 ec2 = {
5 hvm = lib.mkOption {
5 hvm = lib.mkOption {
6− default = false;
6+ default = lib.versionAtLeast config.system.stateVersion "17.03";
7 internal = true;
7 internal = true;
8 description = ''
8 description = ''
9 Whether the EC2 instance is a HVM instance.
9 Whether the EC2 instance is a HVM instance.
@@ -11,12 +11,4 @@
11 };
11 };
12 };
12 };
13 };
13 };
14−
15− config = {
16− assertions = [
17− { assertion = config.ec2.hvm;
18− message = "Paravirtualized EC2 instances are no longer supported.";
19− }
20− ];
21− };
22}
14}