diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-06 16:18:51 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-06 16:18:51 +0000 |
commit | 9afbeb71219925d54b72b0170b2e3be76bad1e28 (patch) | |
tree | d80c6bf0441de5412475859de320806b0e5a454c /nixpkgs/nixos/maintainers | |
parent | 75eafe97f7df0d653bec67f3962214d7c357831f (diff) | |
parent | ae6bdcc53584aaf20211ce1814bea97ece08a248 (diff) | |
download | nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.gz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.bz2 nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.lz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.xz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.zst nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.zip |
Merge commit 'ae6bdcc53584aaf20211ce1814bea97ece08a248'
# Conflicts: # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/nixos/maintainers')
-rw-r--r-- | nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix index 31e15537179a..36f3e7af873d 100644 --- a/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -8,10 +8,15 @@ in { imports = [ ../../../modules/virtualisation/amazon-image.nix ]; - # Required to provide good EBS experience, + # Amazon recomments setting this to the highest possible value for a good EBS + # experience, which prior to 4.15 was 255. # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes - # TODO change value to 4294967295 when kernel is updated to 4.15 or later - config.boot.kernelParams = [ "nvme_core.io_timeout=255" ]; + config.boot.kernelParams = + let timeout = + if pkgs.lib.versionAtLeast config.boot.kernelPackages.kernel.version "4.15" + then "4294967295" + else "255"; + in [ "nvme_core.io_timeout=${timeout}" ]; options.amazonImage = { name = mkOption { |