The cloneConfig module can prevent the incus-create-nixos-config.service from
running because it will already have generated a configuration.nix.
Also modifies the test to hopefully catch that.
Fixes 0f363a1cb4
With the move to EBS Direct API uploads (PutSnapshotBlock), raw images
can be uploaded directly without conversion, making the qemu-img vpc
conversion step unnecessary.
This avoids a build-time format conversion and simplifies upload
workflows that use the EBS Direct API (e.g. NixOS/amis#364).
docker: move /init symlink creation from activationScript to installBootLoader,
which is the mechanism switch-to-configuration already uses for this purpose.
lxc: remove redundant activation script.
The installBootLoader hook was already handling /sbin/init.
incus: replace activationScript with a oneshot systemd service that uses
ConditionPathExists to create /etc/nixos/configuration.nix only on first
boot.
See: https://github.com/NixOS/nixpkgs/issues/475305
This kernel parameter was accidentally added to the image builder module
in 2018 (e4777ae2d8) when it should have been in the runtime config.
This causes a mismatch between AMIs built with the builder and systems
configured with just the runtime module.
Move it to modules/virtualisation/amazon-image.nix so that all EC2
instances get the recommended NVMe timeout, regardless of how they
were provisioned.
This prints the whole host public keys in the same format as cloud-init.
The main benefit is that this allows the direct generation of a known_hosts
file, simplifying client setup.
This commit also provides a new NixOS test that's an alternative to the
currently broken nixos/tests/ec2.nix tests.
hydra-build-products is automatically updated with the right name, as
is image-info.json.
This breaks hardcoded uses of the filename, but ensures that all the
other outputs are consistent and image.filePath is correct
vpc files use the extension "vhd". `make-disk-image-nix` contains a
lookup table, but does not expose that. vpc is the only format
supported by the amazon image which is affected. Format and extension
are the same for raw and qcow2.
Disk usage of the image has risen considerably since last release. We
still need to investigate the cause in detail. Increasing it for now
prevents build failures at least.
By default, `system.nixos.label` includes `system.nixos.tags` which
historically was not set for the amazon image.
Keeping the tag in the label of the generated disk image inside the
derivation (i.e. `image.filePath`) makes it easier to tell that the
file is for amazon (i.e.
`nixos-image-amazon-25.11pre-git-x86_64-linux.vpc`) while the "label"
in `image-info.json` for users of the AWS api stays stable (i.e.
`/25.05pre-git-x86_64-linux`).
`
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
these changes were generated with nixq 0.0.2, by running
nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix
two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.
Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
Enables networkd instead of dhcpcd for DHCP/RA. It offers a solid base
for network configuration, that is much more extensible than dhcpcd and
also better maintained than our bespoke `networking.interfaces` modules.
Closes: #287269