summary refs log tree commit diff
path: root/nixos/maintainers
Commit message (Collapse)AuthorAge
* nixos/nix-daemon: use structural settingspolykernel2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `nix.*` options, apart from options for setting up the daemon itself, currently provide a lot of setting mappings for the Nix daemon configuration. The scope of the mapping yields convience, but the line where an option is considered essential is blurry. For instance, the `extra-sandbox-paths` mapping is provided without its primary consumer, and the corresponding `sandbox-paths` option is also not mapped. The current system increases the maintenance burden as maintainers have to closely follow upstream changes. In this case, there are two state versions of Nix which have to be maintained collectively, with different options avaliable. This commit aims to following the standard outlined in RFC 42[1] to implement a structural setting pattern. The Nix configuration is encoded at its core as key-value pairs which maps nicely to attribute sets, making it feasible to express in the Nix language itself. Some existing options are kept such as `buildMachines` and `registry` which present a simplified interface to managing the respective settings. The interface is exposed as `nix.settings`. Legacy configurations are mapped to their corresponding options under `nix.settings` for backwards compatibility. Various options settings in other nixos modules and relevant tests have been updated to use structural setting for consistency. The generation and validation of the configration file has been modified to use `writeTextFile` instead of `runCommand` for clarity. Note that validation is now mandatory as strict checking of options has been pushed down to the derivation level due to freeformType consuming unmatched options. Furthermore, validation can not occur when cross-compiling due to current limitations. A new option `publicHostKey` was added to the `buildMachines` submodule corresponding to the base64 encoded public host key settings exposed in the builder syntax. The build machine generation was subsequently rewritten to use `concatStringsSep` for better performance by grouping concatenations. [1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
* create-amis.sh: possible deprecationTimothy DeHerrera2021-11-11
|
* amis: enable setting ami boot mode on registrationTimothy DeHerrera2021-11-10
| | | | | | | This is important since legacy bios mode is still the default for Intel and AMD based instances on AWS. That is, even if your image is setup to use UEFI on the OS level, the AMI will still use BIOS unless the boot mode is explicitly set during registration.
* create_amis.sh: fix logic for non-zfs amisTimothy DeHerrera2021-11-09
|
* nixosTest.lxdImage: add lxdImage testMaciej Krüger2021-11-03
|
* lxdImage: enable docs & xlibs in standalone imageMaciej Krüger2021-11-03
|
* release.lxdImage: add lxdImage to hydraMaciej Krüger2021-11-03
|
* nixos/maintainers/scripts: Avoid copy in exampleRobert Hensing2021-10-17
|
* Merge pull request #136909 from ncfavier/cleanup-defaults-examplesRobert Hensing2021-10-04
|\ | | | | nixos/doc: clean up defaults and examples
| * nixos/doc: clean up defaults and examplesNaïm Favier2021-10-04
| |
* | create-amis.sh: fix typoTimothy DeHerrera2021-10-03
| |
* | create-amis.sh: use status messageTimothy DeHerrera2021-10-03
| | | | | | | | | | The progress ID is fairly useless. Status message is more useful for humans.
* | create-amis.sh: add support for the ZFS AMIsTimothy DeHerrera2021-10-03
| |
* | create-amis.sh: allow uploading private AMIsTimothy DeHerrera2021-10-03
| |
* | create-amis.sh: make vars overridable from envTimothy DeHerrera2021-10-03
|/
* amazon images: extend the image-info.json to have a disks objectGraham Christensen2021-08-25
| | | | | | | | Having a disks object with a dictionary of all the disks and their properties makes it easier to process multi-disk images. Note the rename of `label` to `system_label` is because `$label`i is something of a special token to jq.
* NixOS/amazonImageZfs: initGraham Christensen2021-08-25
| | | | | | | | | | Introduce an AWS EC2 AMI which supports aarch64 and x86_64 with a ZFS root. This uses `make-zfs-image` which implies two EBS volumes are needed inside EC2, one for boot, one for root. It should not matter which is identified `xvda` and which is `xvdb`, though I have always uploaded `boot` as `xvda`.
* amazonImage: make statically sized againLuke Granger-Brown2021-05-01
| | | | | | | | | For reasons we haven't been able to work out, the aarch64 EC2 image now regularly exceeds the output image size on hydra.nixos.org. As a workaround, set this back to being statically sized again. The other images do seem to build - it's just a case of the EC2 image now being too large (occasionally non-determinstically).
* treewide: use auto diskSize for make-disk-imagelassulus2021-04-24
| | | | (cherry picked from commit f3aa040bcbf39935e7e9ac7a7296eac9da7623ec)
* Revert "treewide: use auto diskSize for make-disk-image"Luke Granger-Brown2021-04-24
| | | | This reverts commit f3aa040bcbf39935e7e9ac7a7296eac9da7623ec.
* Revert "nixos/amazon-image: (temporarily) use fixed disk size again"Luke Granger-Brown2021-04-24
| | | | This reverts commit 6a8359a92ab501ae62739e9d3302f48e3e73c750.
* nixos/amazon-image: (temporarily) use fixed disk size againLuke Granger-Brown2021-04-24
| | | | | | | | | As a temporary workaround for #120473 while the image builder is patched to correctly look up disk sizes, partially revert f3aa040bcbf39935e7e9ac7a7296eac9da7623ec for EC2 disk images only. We retain the type allowing "auto" but set the default back to the previous value.
* treewide: use auto diskSize for make-disk-imagelassulus2021-04-22
|
* add new Google Cloud image for the current releaseAmineChikhaoui2021-03-21
| | | | | update the create-gce.sh script with the ability to create public images out of a GS object.
* amazonImage: Upload disks as GP3 for cheaper & faster IO (#109027)Graham Christensen2021-01-11
| | | | | | GP3 is always faster and cheaper than GP2, so sticking to GP2 is leaving money on the table. https://cloudwiry.com/ebs-gp3-vs-gp2-pricing-comparison/
* Merge pull request #102174 from grahamc/ami-root-use-gptGraham Christensen2020-10-30
|\ | | | | AMI root partition table: use GPT to support >2T partitions
| * nixos.amazonAmi: use legacy+gpt disk images to support partitions >2TGraham Christensen2020-10-30
| |
* | create-amis: improve wording around the service name's IAM roleGraham Christensen2020-10-30
| | | | | | Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
* | create-amis: allow customizing the service role nameGraham Christensen2020-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The complete setup on the AWS end can be configured with the following Terraform configuration. It generates a ./credentials.sh which I just copy/pasted in to the create-amis.sh script near the top. Note: the entire stack of users and bucket can be destroyed at the end of the import. variable "region" { type = string } variable "availability_zone" { type = string } provider "aws" { region = var.region } resource "aws_s3_bucket" "nixos-amis" { bucket_prefix = "nixos-amis-" lifecycle_rule { enabled = true abort_incomplete_multipart_upload_days = 1 expiration { days = 7 } } } resource "local_file" "credential-file" { file_permission = "0700" filename = "${path.module}/credentials.sh" sensitive_content = <<SCRIPT export service_role_name="${aws_iam_role.vmimport.name}" export bucket="${aws_s3_bucket.nixos-amis.bucket}" export AWS_ACCESS_KEY_ID="${aws_iam_access_key.uploader.id}" export AWS_SECRET_ACCESS_KEY="${aws_iam_access_key.uploader.secret}" SCRIPT } # The following resources are for the *uploader* resource "aws_iam_user" "uploader" { name = "nixos-amis-uploader" } resource "aws_iam_access_key" "uploader" { user = aws_iam_user.uploader.name } resource "aws_iam_user_policy" "upload-to-nixos-amis" { user = aws_iam_user.uploader.name policy = data.aws_iam_policy_document.upload-policy-document.json } data "aws_iam_policy_document" "upload-policy-document" { statement { effect = "Allow" actions = [ "s3:ListBucket", "s3:GetBucketLocation", ] resources = [ aws_s3_bucket.nixos-amis.arn ] } statement { effect = "Allow" actions = [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject", ] resources = [ "${aws_s3_bucket.nixos-amis.arn}/*" ] } statement { effect = "Allow" actions = [ "ec2:ImportSnapshot", "ec2:DescribeImportSnapshotTasks", "ec2:DescribeImportSnapshotTasks", "ec2:RegisterImage", "ec2:DescribeImages" ] resources = [ "*" ] } } # The following resources are for the *vmimport service user* # See: https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role resource "aws_iam_role" "vmimport" { assume_role_policy = data.aws_iam_policy_document.vmimport-trust.json } resource "aws_iam_role_policy" "vmimport-access" { role = aws_iam_role.vmimport.id policy = data.aws_iam_policy_document.vmimport-access.json } data "aws_iam_policy_document" "vmimport-access" { statement { effect = "Allow" actions = [ "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", ] resources = [ aws_s3_bucket.nixos-amis.arn, "${aws_s3_bucket.nixos-amis.arn}/*" ] } statement { effect = "Allow" actions = [ "ec2:ModifySnapshotAttribute", "ec2:CopySnapshot", "ec2:RegisterImage", "ec2:Describe*" ] resources = [ "*" ] } } data "aws_iam_policy_document" "vmimport-trust" { statement { effect = "Allow" principals { type = "Service" identifiers = [ "vmie.amazonaws.com" ] } actions = [ "sts:AssumeRole" ] condition { test = "StringEquals" variable = "sts:ExternalId" values = [ "vmimport" ] } } }
* | create-amis.sh: log the full response if describing the import snapshot ↵Graham Christensen2020-10-30
| | | | | | | | tasks fails
* | nixos ec2/create-amis.sh: shellcheck: $ is not needed in arithmeticGraham Christensen2020-10-30
| |
* | nixos ec2/create-amis.sh: shellcheck: explicitly make the additions to ↵Graham Christensen2020-10-30
| | | | | | | | block_device_mappings single strings
* | nixos ec2/create-amis.sh: shellcheck: read without -r mangles backslashesGraham Christensen2020-10-30
| |
* | nixos ec2/create-amis.sh: shellcheck: SC2155: Declare and assign separately ↵Graham Christensen2020-10-30
| | | | | | | | to avoid masking return values.
* | nixos ec2/create-amis.sh: shellcheck: quote state_dir referenceGraham Christensen2020-10-30
| |
* | nixos ec2/create-amis.sh: shellcheck: quote region referencesGraham Christensen2020-10-30
|/
* Merge pull request #89116 from wagdav/fix-args-create-amisLassulus2020-08-22
|\ | | | | nixos/maintainers/scripts/ec2/create-amis.sh: fix argument check
| * create-amis: fix argument checkDavid Wagner2020-05-28
| | | | | | | | | | | | | | | | | | Because this script enables `set -u` when no arguments are provided bash exits with the error: $1: unbound variable instead of the helpful usage message.
* | nixos/ec2: remove dependency on NIX_PATHJörg Thalheim2020-08-16
| | | | | | | | This is required when migrating to flakes
* | nixos/maintainers/*: editorconfig fixeszowoq2020-08-04
| |
* | nixos/azure-new: use local nixpkgsCole Mickens2020-04-27
|/
* nixos/azure: clarify how users work in basic exampleCole Mickens2020-03-29
|
* nixos/azure: upload-image.sh cleanup $1 handlingCole Mickens2020-03-29
|
* nixos/azure: upload-image names the image betterCole Mickens2020-03-29
|
* nixos/azure: simplify example imageCole Mickens2020-03-29
|
* azure: init nixos/maintainers/scripts/azure-newCole Mickens2020-03-29
|
* nixos-ami: update nvme_core.io_timeout for linux kernel >= 4.15Benjamin Hipple2020-03-22
| | | | | | NixOS 20.03 is built on kernel 5.4 and 19.09 is on 4.19, so we should update this option to the highest value possible, per linked upstream instructions from Amazon.
* create-amis: Add eu-north-1adisbladis2020-03-05
|
* maintainers/create-azure.sh: run from anywhereAlyssa Ross2020-01-09
| | | | | I'm not really sure how the line directly after ended up with this, but this line didn't...
* ec2/create-amis.sh: register root device as /dev/xvdaAndrew Childs2019-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the case of blkfront drives, there appears to be no difference between /dev/sda1 and /dev/xvda: the drive always appears as the kernel device /dev/xvda. For the case of nvme drives, the root device typically appears as /dev/nvme0n1. Amazon provides the 'ec2-utils' package for their first party linux ("Amazon Linux"), which configures udev to create symlinks from the provided name to the nvme device name. This name is communicated through nvme "Identify Controller" response, which can be inspected with: nvme id-ctrl --raw-binary /dev/nvme0n1 | cut -c3073-3104 | hexdump -C On Amazon Linux, where the device is attached as "/dev/xvda", this creates: - /dev/xvda -> nvme0n1 - /dev/xvda1 -> nvme0n1p1 On NixOS where the device is attach as "/dev/sda1", this creates: - /dev/sda1 -> nvme0n1 - /dev/sda11 -> nvme0n1p1 This is odd, but not inherently a problem. NixOS unconditionally configures grub to install to `/dev/xvda`, which fails on an instance using nvme storage. With the root device name set to xvda, both blkfront and nvme drives are accessible as /dev/xvda, either directly or by symlink.