Commit Graph

179 Commits

Author SHA1 Message Date
Adam Stephens
017fbd720a lxd-virtual-machine-image: install initial configuration read-write
(cherry picked from commit dfd0d14efc)
2024-06-04 04:16:35 +00:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
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.
2024-04-13 10:07:35 -07:00
Adam C. Stephens
6a6f5206d7
Merge pull request #287100 from mkg20001/lxd-fix-config
lxd-container-image: set mode of configuration.nix
2024-02-15 07:48:05 -05:00
Adam Stephens
cf68af8561
nixos/lxc/container: switch to networkd by default 2024-02-12 16:26:30 -05:00
Adam Stephens
bdc79efc2b
nixos/lxd/vm: fix network config 2024-02-12 16:26:29 -05:00
Maciej Krüger
7e2cabc5ea
Merge pull request #287270 from mweinelt/lxd-networkd
nixos/lxd: use networkd for DHCP/RA
2024-02-11 15:40:59 +01:00
Arian van Putten
a1232992ac nixos/amazon-image: Take over maintainership
I am actively working on bringing back Amazon Images for 24.05.
Please track progress in https://github.com/nixos/amis
2024-02-09 18:02:40 +01:00
Martin Weinelt
73e19e1a8d
nixos/lxd: use networkd for DHCP/RA
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
2024-02-08 17:57:46 +01:00
Maciej Krüger
2ce33c60cf
lxd-container-image: set mode of configuration.nix
before:
```
[root@nixos:~]# ls -la /etc/nixos
total 16
drwxr-xr-x  2 root root 4096 Feb  8 00:51 .
drwxr-xr-x 16 root root 4096 Feb  8 00:51 ..
-r--r--r--  1 root root  605 Feb  8 00:51 configuration.nix
-rw-r--r--  1 root root  150 Feb  8 00:51 lxd.nix
```

after:
```
[root@nixos:~]# ls -la /etc/nixos
total 16
drwxr-xr-x  2 root root 4096 Feb  8 00:50 .
drwxr-xr-x 16 root root 4096 Feb  8 00:50 ..
-rw-r--r--  1 root root  605 Feb  8 00:50 configuration.nix
-rw-r--r--  1 root root  149 Feb  8 00:50 lxd.nix
```
2024-02-08 01:52:05 +01:00
NicGrimpe
82ea33a081
nixos/maintainers: in docs, ./option-usage.nix -> ./option-usages.nix (#271592) 2024-01-18 16:09:29 +01:00
Ryan Lahfa
f520eb3f0c
Merge pull request #263658 from siriobalmelli-foss/sb/zfs-image
openstack-image-zfs and make-single-disk-zfs-image: optionally specify qemu instance memory
2024-01-12 20:25:26 +01:00
Robert Hensing
4d1f62836e scripts/create-amis.sh: Update region list 2023-12-05 18:30:52 +01:00
Maciej Krüger
daff2bb01d
maintainers/lxd: fix double modules
Otherwise it results in <nixpkgs/nixos/modules/modules...> being loaded
2023-11-22 13:25:17 +01:00
Sirio Balmelli
eac98ed50e
openstack-image-zfs: add 'ramMB' option to configure build VM memory
Increase 'ramMB' to avoid OOM errors when building images.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2023-10-31 08:28:45 +01:00
K900
67f87ecc27 nixos/maintainers/scripts/lxd: simplify config generation
Use modulesPath so we don't have to magically rewrite paths in activation script,
set stateVersion to the one this was built with (which should approximate "first install")
2023-10-27 12:56:12 +03:00
K900
100931cca6 nixos/maintainers/scripts/azure-new: remove stateVersion assignment
We should really have the user set it, or at least have a warning.
2023-10-27 12:56:12 +03:00
Thiago Kenji Okada
371cebacb5 maintainers/scripts/oci: add missing parameter 2023-09-21 22:57:39 +01:00
Thiago Kenji Okada
c655cdb536 maintainers/scripts/oci: make scripts fail on error 2023-09-21 22:57:39 +01:00
ilian
e8fc4d22e9 maintainers/scripts/oci: Fix indentation 2023-09-21 22:57:39 +01:00
Samuel Dionne-Riel
5056824e64 maintainers/scripts/oci: Allow A1 image builds 2023-09-21 22:15:22 +01:00
ilian
362d1d6218 oci-image: init scripts to build and upload image
Add image configuration for Oracle Cloud Infrastructure and scripts to
build and upload the image as a Custom Image.
2023-09-21 22:15:22 +01:00
Adam Stephens
efd1605be6
nixos/lxd: add virtual-machine support, image and module 2023-09-03 20:06:44 -04:00
K900
a3dc53e3fc nixos/amazon-image: embiggen
aarch64 no longer fits in 2GB, blocking channel updates
2023-06-07 08:42:47 +03:00
figsoda
a31ca7f220 maintainers/scripts: fix typos 2023-05-19 22:31:04 -04:00
Anderson Torres
c637afe9c1
Merge pull request #229030 from atorres1985-contrib/with-lib-is-bad
With lib is bad: removes `with lib;` occurrences - part I
2023-05-17 20:24:46 -03:00
AndersonTorres
1be3d36336 nixos/maintainers/scripts/lxd/nix.tpl: get rid of with lib 2023-05-12 22:29:25 -03:00
AndersonTorres
80f0839fde nixos/maintainers/scripts/lxd/lxd-image.nix: get rid of with lib 2023-05-12 22:29:24 -03:00
AndersonTorres
0a1db38632 nixos/maintainers/scripts/lxd/lxd-image-inner.nix: get rid of with lib 2023-05-12 22:29:24 -03:00
AndersonTorres
85a7b22c6e nixos/maintainers/scripts/cloudstack/cloudstack-image.nix: get rid of with lib 2023-05-12 22:29:24 -03:00
Raito Bezarius
b69534e072 maintainers/scripts/openstack/openstack-image-zfs: use qemu_kvm (host arch) instead of qemu (all arches) 2023-04-28 23:51:24 +02:00
Raito Bezarius
f9c4838812 maintainers/scripts/ec2/amazon-image: use qemu_kvm (host arch) instead of qemu (all arches) 2023-04-28 23:51:07 +02:00
Jason Yundt
b1bb9bb6c8 treewide: fix backwards smart apostrophes
According to the Unicode Standard, you should use U+2019 RIGHT SINGLE
QUOTATION MARK for apostrophes [1]. Before this change, some of the text
in this repo would use U+2018 LEFT SINGLE QUOTATION MARKs instead.

[1]: https://www.unicode.org/versions/Unicode15.0.0/ch06.pdf#G12411
2023-02-06 07:24:42 -05:00
Izorkin
2b6bfed79c
nixos/lxc-container: undo some of the minimal profile stuff 2022-12-09 23:18:37 +03:00
Linus Heckemann
24e33a4d2e nixos/ec2: remove paravirtualization-specific code
Paravirtualized EC2 instances haven't been supported since 2017.
It's safe to remove this now.
2022-11-23 17:18:18 +01:00
pennae
bd56368848 nixos/*: md-convert hidden plaintext options
most of these are hidden because they're either part of a submodule that
doesn't have its type rendered (eg because the submodule type is used in
an either type) or because they are explicitly hidden. some of them are
merely hidden from nix-doc-munge by how their option is put together.
2022-08-31 16:32:54 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
olaf
5a6853b3bf use consistently user alice for examples 2022-08-05 13:13:24 +02:00
Armando Santos
fdf74c7741
maintainers/create-amis.sh: Add more AWS regions
Add all currently available AWS regions
2022-05-17 10:20:30 +01:00
Patryk Wychowaniec
56ab4f61bc
nixos/lxd: improve tests
- Make tests/lxd.nix use NixOS's lxdMeta & lxdImage to avoid relying on
  3rd party containers such as Alpine Linux for testing purposes.
- Merge tests/lxd-image.nix into tests/lxd.nix, since now both have a
  similar structure.
- Extract duplicated inline LXD configuration into a separate file,
- Add passthru.lxd-nftables & passthru.lxd-image-server.
2022-05-03 12:24:13 +02:00
Graham Christensen
555bc5335b openstack-image-zfs: start copying the channel now that we've mostly got the expressions down 2022-04-07 15:28:28 -04:00
Graham Christensen
b4c495aeff openstack-image-zfs: make the generated configuration.nix valid
Drops the wrong expandOnBoot option (defaults to all) and mark ZFS as enabled.
2022-04-07 15:28:28 -04:00
Graham Christensen
9e3dab7d2e openstack-image-zfs: build a single-image ZFS root 2022-04-07 15:28:28 -04:00
Graham Christensen
1c0b76b5c4 openstack-image-zfs: don't support vpc type, default to qcow2 2022-04-07 15:28:28 -04:00
Graham Christensen
a8f41adbb7 amazon-image: use make-multi-disk-zfs-image 2022-04-07 15:28:28 -04:00
Graham Christensen
b8fe792394 openstack-image-zfs: init 2022-04-07 15:28:27 -04:00
Graham Christensen
e9f015480c openstack-image: make it easy to disable copying the channel to improve iteration time 2022-04-07 15:28:27 -04:00
Graham Christensen
b3dfff282b openstack-image: minor cleanups
Format and remove unnecessary `with lib;`.
2022-04-07 15:28:27 -04:00
polykernel
4a9d9928dc nixos/nix-daemon: use structural settings
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
2022-01-26 21:04:50 -05:00
Timothy DeHerrera
f0aec20cd7
create-amis.sh: possible deprecation 2021-11-11 09:04:29 -07:00
Timothy DeHerrera
ed4170733c
amis: enable setting ami boot mode on registration
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.
2021-11-10 17:38:58 -07:00