Commit graph

1397 commits

Author SHA1 Message Date
Robert Hensing 6510ec5acd nixos: Make system.build.vm a standard attribute based on vmVariant 2021-12-17 14:49:31 +01:00
Robert Hensing f72432aeb2 nixos: Move build-vm into virtualisation.vmVariant
... which is like a specialisation, but for nixos-rebuild build-vm
2021-12-17 13:19:16 +01:00
Artturin 39c5525cb1 nixos/qemu-vm: add -device virtio-keyboard to opts
by default a ps/2 keyboard input is used which seems to cause issues
on aarch64-linux when the machine is used high load, causing the keymap
qwertz test to always fail and azerty to sometimes fail
See https://github.com/NixOS/nixpkgs/issues/147294
2021-12-10 01:04:33 +02:00
zowoq 79e66fce1c nixos/podman: sort files into directories
Makes codeowners, git history, etc. a bit simpler now that podman has expanded beyond the original single file module and test.
2021-12-09 13:03:16 +10:00
pennae 2d564521c0 treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as
defaults that depend on the system stateVersion, defaults that are
derivations specific to the surrounding context, or those where the
expression is much longer and harder to understand than a simple text
snippet.
2021-12-09 01:38:24 +01:00
Maximilian Bosch c959de5b30
Merge pull request #148360 from helsinki-systems/drop/pg96
postgresql_9_6: drop
2021-12-06 21:57:05 +01:00
Robert Hensing 862d167f17
Merge pull request #147441 from pennae/option-doc-staticizing
nixos/*: add trivial defaultText to options where applicable
2021-12-06 01:35:38 +01:00
Tristan 7f6a2d5663 oci-containers: fix imageFile example 2021-12-04 10:23:58 +01:00
Maciej Krüger 79f6a3147f
Merge pull request #147365 from FlorianFranzen/waydroid/psi-default 2021-12-03 14:58:31 +01:00
Florian Franzen 64a0cf0df2
nixos/waydroid: enable kernel psi interface if required 2021-12-03 13:04:17 +01:00
ajs124 757dd008b2 postgresql_9_6: drop 2021-12-03 01:14:29 +01:00
pennae 2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
AmineChikhaoui fa06cf556e ec2-amis: add release 21.11 2021-12-02 11:01:47 -05:00
Robert Hensing 0f33d439a7
Merge pull request #140992 from hercules-ci/aarch64-amis
Add aarch64 AMIs
2021-12-01 14:48:00 +01:00
Artturin 21585dc683 nixos/vmware-guest: add display-manager to after and
add ConditionVirtualization

and remove unneeded before and wants which are not in the upstream
package, the wantedBy should be enough
2021-11-25 04:33:05 +02:00
Artturi c4851c0d71
Revert msize related commits (#147180) 2021-11-24 02:33:53 +02:00
Artturi 53edfe1d1c
Merge pull request #146804 from Artturin/qemudefaultmem 2021-11-21 17:48:08 +02:00
Artturin 54ece050b8 nixos/qemu-vm: default memorySize 384 -> 1024
the default hasn't been changed since 2009
this can improve our test performances

nixos/tests: remove explicit memorySize <1024

1024MiB is now the default
2021-11-21 17:27:58 +02:00
Ryan Burns 2175b157ac treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
Artturi dd4ce550b3
Merge pull request #146456 from Artturin/misc-updates1 2021-11-20 01:14:44 +02:00
Janne Heß ecf388e90b
vmTools: Make msize larger to silence warning
See https://issues.guix.gnu.org/47225
2021-11-18 21:21:49 +01:00
Artturin a96a6e7515 nixos/qemu-vm: fix deprecation readonly -> readonly=on
machine # qemu-system-x86_64: -drive if=pflash,format=raw,unit=0,readonly,...: warning:
short-form boolean option 'readonly' deprecated
vm-test-run-systemd-boot-specialisation> machine # Please use readonly=on instead
2021-11-18 21:32:56 +02:00
Alyssa Ross 42adeef9ec
nixos/qemu-guest-agent: use qemu_kvm
Since e791519f0f ("nixos/qemu-vm: use qemu_kvm"), VMs generated with
nixos-rebuild build-vm use the qemu_kvm package instead of the qemu
package.  (The difference between them is that qemu_kvm is only built
with support for the host architecture, not all architectures.)

But with this change, nixos-rebuild build-vm would now depend on
_both_ QEMUs, because the guest agent module was still using the one
from the full QEMU package.  There's no need for it to use this
instead of the lighter qemu_kvm, because the guest agent shouldn't be
affected by which platforms QEMU can emulate.
2021-11-14 20:28:06 +00:00
Artturi 76439257f4
Merge pull request #145394 from Artturin/removedeprecated1 2021-11-13 03:19:16 +02:00
Artturin 0686311257 nixos/lxc-container: remove deprecated literalExample 2021-11-10 23:55:13 +02:00
Robert Hensing 6c690b07f7
Merge pull request #144788 from hercules-ci/double-default-qemu-diskSize
virtualisation/qemu-vm: Double the default diskSize
2021-11-10 17:47:29 +01:00
illustris 8d197bffd8
nixos/proxmox-image: init (#144013)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-11-07 16:02:54 +01:00
Magicloud 40c83d1e0a
virtualbox: Add option to build vboxwebsrv tool
`vboxwebsrv`, a.k.a, Virtualbox Web Service, provides a way to manage VMs via SOAP interface. This is very useful on headless servers.
2021-11-07 08:34:47 +01:00
Maciej Krüger 83c93c8e1c
Merge pull request #141076 from CajuM/waydroid-module 2021-11-07 08:14:45 +01:00
Martin Weinelt 65be52ba2a
Merge pull request #144201 from misuzu/iptables-switch-fix 2021-11-06 12:28:51 +01:00
Mihai-Drosi Câju 7e76b12d57
nixos/waydroid: init 2021-11-06 08:57:57 +01:00
Robert Hensing 4ec119009b virtualisation/qemu-vm: Double the default diskSize
The default has been unchanged for a decade. Space is cheaper and
software catches up with that. Let's not make our testing harder
than necessary by default.
2021-11-05 21:06:08 +01:00
ajs124 ce21576c61
Merge pull request #142408 from mschwaig/fix-vmware-guest-headless
nixos/vmware-guest: fix headless option
2021-11-05 12:33:37 +01:00
Maciej Krüger 1c31f8db6a
nixosTest.lxdImage: add lxdImage test 2021-11-03 07:49:54 +01:00
Maciej Krüger a797967cec
lxdImage: split from docker profile, use generators.toYAML 2021-11-03 07:49:54 +01:00
Maciej Krüger fec499bb98
virtualisation.lxc: replace /sbin/init on switch
in the future maybe a proper shim-bootloader could be used that supports 
switching out /sbin/init (so nixos-rebuild boot would just switch the 
link)
2021-11-03 07:49:53 +01:00
Maciej Krüger 8eac2a669a
virtualisation.lxc: add default for .templates 2021-11-03 07:49:53 +01:00
Maciej Krüger 681bd59661
virtualisation.lxc: apply changes from review 2021-11-03 07:49:52 +01:00
Maciej Krüger 9f66f9a669
release.lxdImage: add lxdImage to hydra 2021-11-03 07:49:52 +01:00
Maciej Krüger 5ea329958a
virtualisation.lxc: add the overrides from distrobuilder 2021-11-03 07:49:52 +01:00
Maciej Krüger 1c7a7f198c
virtualisation.lxc: split meta and root 2021-11-03 07:49:51 +01:00
Maciej Krüger d203189dbf
virtualisation.lxc: use openFirewall instead of allowedTCPPorts 2021-11-03 07:49:51 +01:00
Maciej Krüger caabd8933c
virtualisation.lxc: add support for lxd templates 2021-11-03 07:49:51 +01:00
Maciej Krüger b9df9ca2c4
virtualisation.lxc: indent config 2021-11-03 07:49:50 +01:00
Maciej Krüger d262f6f593
virtualisation.lxc-container: overwrite tarball for lxd 2021-11-03 07:49:50 +01:00
Maciej Krüger 9d3df0b2ac
nixos/lxd: fix nftables switch #81172 breaking module 2021-11-03 07:41:40 +01:00
misuzu ff22dd6684 nixos/libvirtd: use /etc/ethertypes from iptables package
This change is part of #81172 and must have been lost during staging cycle.
2021-11-02 11:45:19 +02:00
Alyssa Ross e791519f0f
nixos/qemu-vm: use qemu_kvm
qemu_kvm is only built for one architecture, so it's smaller and takes
MUCH less time to build if it has to be built from source.  And this
module doesn't support running a VM for one architecture from another
architecture, so the one architecture is all we'll need.
2021-11-01 12:04:45 +00:00
talyz af9f6d9a2a nixos/qemu-vm: Rename pathsInNixDB to additionalPaths
pathsInNixDB isn't a very accurate name when a Nix store image is
built (virtualisation.useNixStoreImage); rename it to additionalPaths,
which should be general enough to cover both cases.
2021-10-28 12:55:01 +02:00
talyz 84839b395f nixos/qemu-vm: Allow building a Nix store image instead of using 9p
Add the `useNixStoreImage` option, allowing a disk image with the
necessary contents from the Nix store to be built using
make-disk-image.nix. The image will be mounted at `/nix/store` and
acts as a drop-in replacement for the usual 9p mounting of the host's
Nix store.

This removes the performance penalty of 9p, drastically improving
execution speed of applications which do lots of reads from the Nix
store. The caveats are increased disk space usage and image build
time.
2021-10-28 12:55:01 +02:00
Martin Schwaighofer 60369bb333 nixos/vmware-guest: fix headless option
The headless option broke with 7d8b303e3f
because the path /bin/vmware-user-suid-wrapper does not exist in the
headless variant of the open-vm-tools package.

Since the vmblock fuse mount and vmware-user-suid-wrapper seem to only
be used for shared folders and drag and drop, they should not exist in
the vmware-guest module if it is configured as headless.
2021-10-20 16:12:07 +02:00
figsoda a209d563cd
Merge pull request #142032 from thiagokokada/refactor-libvirtd-module
nixos/libvirtd: refactor module
2021-10-18 16:07:05 -04:00
Sam Hug d6e1fb43c4 nixos/hyperv: fix evaluation of kernelParams 2021-10-18 11:22:53 -07:00
Thiago Kenji Okada 9e7b50e885 nixos/libvirtd: refactor module
Move all `virtualisation.libvirtd.qemu*` options to a
`virtualisation.libvirtd.qemu` submodule.

Also for consistency, add `virtualisation.libvirtd.qemu.swtpm.package`
(only new option during this refactor.)
2021-10-18 13:45:35 -03:00
Jade 8d52479bc7 nixos/libvirtd: Add configuration option for swtpm 2021-10-17 16:48:17 +02:00
Thiago Kenji Okada 5f7e675c45 nixos/libvirtd: add qemuOvmfPackage option 2021-10-17 11:39:25 +02:00
Robert Hensing 00563d4f07 amazon-ec2-amis: Add aarch64 amis 2021-10-08 17:30:02 +02:00
Robert Hensing 5a6c43dda3 ec2-amis.nix -> amazon-ec2-amis.nix, new format 2021-10-08 17:30:01 +02:00
Maximilian Bosch f700a92d5c
nixos/qemu-vm: quote QEMU_NET_OPTS
Co-authored-by: Michele Guerini Rocco <rnhmjoj@users.noreply.github.com>
2021-10-06 23:12:53 +02:00
Maximilian Bosch 60e731d1ce
nixos/qemu-vm: fix running VM with QEMU_NET_OPTS
I realized quite recently that running a test VM - as documented in the
manual - like

    QEMU_NET_OPTS='hostfwd=tcp::8080-:80'  ./result/bin/nixos-run-vms

doesn't work anymore on `master`. After bisecting I realized that the
introduction of a forward-port option[1] is the problem since it adds a
trailing comma even if no forwarding options are specified via
`virtualisation.forwardPorts`. In that case, the networking options
would look like `-netdev user,id=user.0,,hostfwd=tcp::8080-:80' which
confused QEMU and thus the VM refused to start.

Now, the trailing comma is only added if additional port forwards are
specified declaratively.

[1] b8bfc81d5b
2021-10-06 22:40:30 +02:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rnhmjoj 1497e8f5f5
nixos/qemu: use set -e in shell script
Also fix this: https://github.com/koalaman/shellcheck/wiki/SC2166
2021-09-29 08:46:03 +02:00
Timothy DeHerrera 895f3956d2
Merge pull request #127933 from rnhmjoj/qemu-restoration
Qemu restoration
2021-09-28 21:35:23 -06:00
rnhmjoj b6fbbe768d
nixos/containerd: use v2 settings by default
Kubernetes is using v2 setting names and is the only module
in Nixpkgs using containerd, so it makes sense to upgrade.
2021-09-23 00:18:58 +02:00
rnhmjoj 74c572d2f8
nixos/vmware-guest: fix setuid wrapper
Since 904f68fb0, setuid/owner/group are required.
2021-09-20 23:49:46 +02:00
Jeremy Kolb cb9167139e
vmware-guest: Use vmware-vmblock-fuse for drag-and-drop synchronization (#131278) 2021-09-19 18:15:41 +03:00
Guillaume Girol ceb2e6667b
Merge pull request #126289 from rnhmjoj/wrappers
nixos/security/wrappers: make well-typed
2021-09-18 15:28:49 +00:00
rnhmjoj b29c2f97c3
nixos/lib/qemu-flags: rename to qemu-common
The current name is misleading: it doesn't contain cli arguments,
but several constants and utility functions related to qemu.
This commit also removes the use of `with import ...` for clarity.
2021-09-18 16:58:16 +02:00
rnhmjoj b8bfc81d5b
nixos/qemu: add option to forward ports 2021-09-18 16:47:12 +02:00
rnhmjoj 44d95b773b
nixos/qemu: make display resolution configurable 2021-09-18 16:47:11 +02:00
rnhmjoj ec6c604b6e
nixos/qemu: make shared directories configurable 2021-09-18 16:47:11 +02:00
rnhmjoj 30f0faac22
nixos/qemu: add types to all options 2021-09-18 16:47:11 +02:00
rnhmjoj f1f434c4f7
nixos/qemu: cleaner formatting of the run-machine-vm script 2021-09-18 16:47:11 +02:00
rnhmjoj 2af5413cc6
nixos/qemu: set a reasonable msize by default 2021-09-18 16:47:10 +02:00
rnhmjoj 65e83389ef
nixos/qemu: fix deprecation warning 2021-09-18 16:47:10 +02:00
rnhmjoj c1fd51f490
nixos/qemu: fix several shellcheck issues
- Fix shell quoting issues
- Fix unsafe cd in run-machine-vm script
2021-09-18 16:46:20 +02:00
Artturi 74b3e9ff87
Merge pull request #136471 from Artturin/tmpontmpfssize 2021-09-16 02:25:02 +03:00
rnhmjoj fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00
Guillaume Girol bc3bca822a nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
Artturin f45e8d560e nixos/tmp: add tmpOnTmpfsSize 2021-09-08 19:30:52 +03:00
Graham Christensen bd38b059ea NixOS/amazonImageZfs: init
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`.
2021-08-25 10:42:35 -04:00
Your Name c042c1a1f8 NixOS AWS AMI: Create boot entries for each system generation 2021-08-20 14:02:11 -04:00
Your Name 1b79176310 NixOS AWS AMI: enable the serial console on ttyS0 2021-08-20 12:42:02 -04:00
Your Name 54aa35d40e NixOS AWS AMI: Configure Grub's serial console
See:

* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-os.html
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/grub.html
2021-08-20 11:22:45 -04:00
Your Name bfd2f800ee NixOS AMI: Give grub a 1s timeout now that AWS has emergency console access.
See:

* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-os.html
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/grub.html
2021-08-20 11:22:39 -04:00
Your Name 0ccd6448d6 NixOS AWS AMI: Set the console to 115200n8
See:

* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-os.html
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/grub.html
2021-08-20 11:15:31 -04:00
Robert Hensing fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
edef 9451a23e9f
Merge pull request #130265 from liclac/gce-image-compression-level
google-compute-image: Add a setting for GZIP compression level
2021-08-13 14:31:08 +00:00
Artturi c10ded1bb2
Merge pull request #131966 from ArctarusLimited/fix/containerd-restart
nixos/virtualisation/containerd: do not wipe runtime directory on restart or stop
2021-08-08 17:21:30 +03:00
Luke Granger-Brown b5fab53628 nixos/virtualbox-image: cast baseImageFreeSpace into str
This fixes an evaluation error that's blocking the nixos-unstable
channel (#132328).
2021-08-01 18:59:08 +00:00
Alex Zero bd14d73794
nixos/modules/virtualisation/containerd: do not wipe runtime directory on restart or stop 2021-07-29 16:17:40 +01:00
lassulus a6700d75f3 vbox-image: add new option to set free space in image 2021-07-24 09:33:10 +02:00
embr 8e6c4f9a2e nixos/cri-o: Remove unnecessary lib. qualifiers
We're already using `with lib` here, so we can just say `mkOption`, etc.
2021-07-20 15:35:45 +10:00
embr 1cf78b53af nixos/cri-o: Add RFC42 'settings' option 2021-07-20 15:35:45 +10:00
Jeremy Kolb f96ee10c88
open-vm-tools: 11.2.5 -> 11.3.0 (#129978)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-07-14 03:26:58 +02:00
embr 91646d62b9 google-compute-image: Make GZIP compression level configurable
Change-Id: I1bde130f0a951fa40b1a16bad09497c796bca473
2021-07-13 16:53:09 +02:00
Tobias Happ bbd5cdac29 nixos/oci-containers: enable login for registry 2021-07-08 16:30:17 +10:00
Ramses 14d2192623 nixos/oci-containers: restore ability to easily view the container output in the logs
Fixes #102768.
Allows the usage of `journalctl -u` to easily view the logs for a container managed by this module.
2021-07-06 07:36:33 +10:00
Maciej Krüger b877b70d32
Merge pull request #125366 from mkg20001/vbox-export-params 2021-06-28 06:58:01 +02:00
jakobrs 475c007da0 nixos/libvirtd: add assertion requiring polkit to be enabled 2021-06-07 15:12:21 +02:00
AmineChikhaoui 7e89fb12e4 ec2-amis: add release 21.05 2021-06-06 17:09:14 -07:00
Sandro 6e2204ea32
Merge pull request #123364 from edude03/patch-7 2021-06-06 01:35:18 +02:00
Edward Tjörnhammar afdb5675a1 nixos/containers: add storage.conf 2021-06-05 10:08:24 +10:00
Maciej Krüger 26b3751de7
Merge pull request #97692 from ryneeverett/lockkernelmodules-lxd 2021-06-05 01:27:27 +02:00
zowoq 3cf17240f0 Revert "nixos/containers: add storage.conf"
This file requires some defaults to be set otherwise podman, etc errors.
It also broke the podman nixos tests.

This reverts commit 7a4de9a983.
2021-06-03 13:56:17 +10:00
Maciej Krüger 5faa7056f9
nixos/virtualbox-image: add exportParams
This allows the user to specify custom export
parameters like adding a vendor to the exported VM
2021-06-02 13:28:43 +02:00
Edward Tjörnhammar 7a4de9a983 nixos/containers: add storage.conf 2021-06-02 19:03:53 +10:00
Robert Hensing d9e4512443
Merge pull request #124589 from hercules-ci/containers-dnsname
nixos/podman-dnsname: init
2021-06-02 08:18:48 +02:00
Jörg Thalheim f2e4cb7f20
nixos/containerd: improve zfs support 2021-06-01 20:41:42 +02:00
zowoq 72f54c32a6 nixos/podman-network-socket-ghostunnel: move condition to include socket 2021-05-31 23:38:31 +10:00
Robert Hensing 54f2f1e5f1 nixos/podman-dnsname: init 2021-05-31 14:31:09 +02:00
Robert Hensing d81631fb98 nixos/podman: Add defaultNetwork.extraPlugins 2021-05-31 14:31:09 +02:00
Robert Hensing efba949352 nixos/containers: Add virtualisation.containers.containersConf.cniPlugins 2021-05-31 14:29:57 +02:00
Robert Hensing 3600a82711
Merge pull request #124921 from zowoq/podman-cni-conf
podman: install cni config
2021-05-31 14:27:10 +02:00
Martin Weinelt 219d8381bd
Merge pull request #124947 from helsinki-systems/fix/libvirtd-ethertypes 2021-05-30 16:52:46 +02:00
Janne Heß 964fc7cfef
Update nixos/modules/virtualisation/libvirtd.nix
Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
2021-05-30 16:00:50 +02:00
Janne Heß 2eeecef3fc
nixos/libvirtd: Take ethertypes from iptables-nftables-compat
iptables is currently defined in `all-packages.nix` to be
iptables-compat. That package does however not contain `ethertypes`.
Only `iptables-nftables-compat` contains this file so the symlink
dangles.
2021-05-30 11:55:19 +02:00
Robert Hensing b6570e7238 nixos/podman-network-socket-ghostunnel: init 2021-05-30 11:23:24 +02:00
Robert Hensing 52844efcd6 nixos/podman: Add generic networkSocket interface 2021-05-30 11:21:05 +02:00
Robert Hensing ff4d83a667 nixos/podman: Add dockerSocket.enable 2021-05-30 11:21:05 +02:00
Robert Hensing fb8b0a3843 nixos/podman: Change podman socket to new podman group 2021-05-30 11:21:05 +02:00
zowoq 30ae7e4ba9 nixos/podman: install cni config from package 2021-05-30 11:40:36 +10:00
Anderson Torres e445fc8661
Merge pull request #123583 from superherointj/module-libvirtd-ovmf-aarch64-fix
libvirtd: fix ovmf for aarch64
2021-05-23 19:56:27 -03:00
Maximilian Bosch 9cab80ce4d
Merge pull request #122203 from mohe2015/imperative-nixos-container-timeout
nixos-containers: Increase startup timeout for imperative containers
2021-05-22 23:04:12 +02:00
Jörg Thalheim 5b4915fb7a
Merge pull request #110927 from Izorkin/fix-qemu-ga
nixos/qemu-guest-agent: fix start service
2021-05-19 05:42:06 +01:00
superherointj 4e3060d488 libvirtd: fix ovmf for aarch64 2021-05-18 17:27:37 -03:00
Michael Francis 80830373f0
Update openvswitch.nix 2021-05-17 21:11:07 +08:00
Michael Francis adc368d2fc
Only include ipsecTools if using ipsec 2021-05-17 21:00:57 +08:00
Sandro 700942d2a5
Merge pull request #121119 from SuperSandro2000/remove-gnidorah
treewide: remove gnidorah
2021-05-17 02:42:24 +02:00
Johan Thomsen 7e310dd8e8 nixos/containerd: StartLimit* options must be in the unit-section
also, raise limits to ensure reasonable startup time, now that StartLimits are actually enforced
2021-05-17 06:17:18 +10:00
Johan Thomsen 2142f88526 nixos/containerd: sanitize StateDirectory and RuntimeDirectory 2021-05-17 06:17:18 +10:00
github-actions[bot] 39e3f7c2cc
Merge master into staging-next 2021-05-13 18:32:50 +00:00
Luke Granger-Brown ca6255bf0b nixos/docker: fix evaluation when NAT is enabled too
Both networking.nat.enable and virtualisation.docker.enable now want to
make sure that the IP forwarding sysctl is enabled, but the module
system dislikes that both modules contain this option.

Realistically this should be refactored a bit, so that the Docker module
automatically enables the NAT module instead, but this is a more obvious
fix.
2021-05-13 10:26:45 +00:00
github-actions[bot] bc1f4b790e
Merge master into staging-next 2021-05-09 12:23:16 +00:00
Hedtke, Moritz 7a80d281ed
nixos/containers: Increase startup timeout for imperative containers
Changed the startup timeout from 15 seconds to one minute as 15 seconds is really low.
Also it's currently not possible to change it without editing your system configuration.
2021-05-08 19:59:20 +02:00
Laurynas Alekna 9317570735 nixos/docker: ensure ipv4 forwarding is enabled
Fixes #118656
2021-05-08 18:58:24 +01:00
github-actions[bot] 77c79724e3
Merge staging-next into staging 2021-05-04 06:20:26 +00:00
Silvan Mosberger 37e2fbda39
Merge pull request #121449 from endgame/metadata-fetcher-umask
metadata fetchers: use umask instead of fetch-and-chmod
2021-05-04 03:39:38 +02:00
github-actions[bot] 5e177b16b1
Merge staging-next into staging 2021-05-03 18:25:49 +00:00
Luke Granger-Brown a0da004326
Merge pull request #121376 from urbas/amazon-init-shell-script-support
nixos/amazon-init: add user-data shell script support
2021-05-03 16:01:26 +01:00
Jack Kelly 5ea55e4ed0 metadata fetchers: use umask instead of fetch-and-chmod 2021-05-02 08:28:59 +10:00
github-actions[bot] ef6416a6ba
Merge staging-next into staging 2021-05-01 00:54:32 +00:00
Florian Klink 44a0debca7
Merge pull request #121021 from pennae/container-sigterm
nixos/nix-containers: use SIGTERM to stop containers
2021-04-30 21:35:16 +02:00
Sandro Jäckel ae02415ee8
treewide: remove gnidorah
due to github account removal/deletion and not other mean of contact.
2021-04-30 01:48:19 +02:00
ryneeverett 161a35b0b8
nixos/lxd: explicitly load xt_CHECKSUM module
This module is needed to create bridge networks such as the default
lxdbr0 created by `lxd init`. Without this module, running `lxc network
create lxdbr0` errors with:

> Error: Failed to create network 'lxdbr0': Failed to run: iptables -w -t mangle -I POSTROUTING -o lxdbr0 -p udp --dport 68 -j CHECKSUM --checksum-fill -m comment --comment generated for LXD network lxdbr0: iptables v1.8.5 (legacy): unknown option "--checksum-fill"
2021-04-29 11:40:00 +02:00
ryneeverett 80e263b389
nixos/lxd: explicitly load kernel modules
This is analogous to #70447 and #76487.

These are all needed to attach a container to the default bridge
network, without which the final line of the following script fails with
the error for each respective kernel module listed below.

```sh
lxc storage create foo dir
lxc launch -s foo ubuntu:trusty bar
lxc network attach lxdbr0 bar
```

veth
----

> Error: Failed to start device 'lxdbr0': Failed to create the veth interfaces vethefbc3cd6 and vetha4abbcbc: Failed to run: ip link add dev vethefbc3cd6 type veth peer name vetha4abbcbc: RTNETLINK answers: Operation not supported

iptable_mangle
--------------

> lvl=eror msg="Failed to bring up network" err="Failed to list ipv4 rules for LXD network lxdbr0 (table mangle)" name=lxdbr0

xt_comment
----------

> lvl=error msg="Failed to bring up network" err="Failed to run: iptables -w -t filter -I INPUT -i lxdbr0 -p udp --dport 67 -j ACCEPT -m comment --comment generated for LXD network lxdbr0: iptables v1.8.4 (legacy): Couldn't load match `comment':No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information." name=lxdbr0

xt_MASQUERADE
-------------

> vl=eror msg="Failed to bring up network" err="Failed to run: iptables -w -t nat -I POSTROUTING -s 10.0.107.0/24 ! -d 10.0.107.0/24 -j MASQUERADE -m comment --comment generated for LXD network lxdbr0: iptables v1.8.4 (legacy): Couldn't load target `MASQUERADE':No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information." name=lxdbr0
2021-04-29 11:37:10 +02:00
github-actions[bot] 01105a117a
Merge staging-next into staging 2021-04-29 06:21:55 +00:00
Peter Hoeg ce93de4f62 nixos/hyperv: bail gracefully if device is missing 2021-04-29 09:37:17 +08:00
pennae 82931ea446 nixos/nix-containers: use SIGTERM to stop containers
systemd-nspawn can react to SIGTERM and send a shutdown signal to the container
init process. use that instead of going through dbus and machined to request
nspawn sending the signal, since during host shutdown machined or dbus may have
gone away by the point a container unit is stopped.

to solve the issue that a container that is still starting cannot be stopped
cleanly we must also handle this signal in containerInit/stage-2.
2021-04-28 14:07:35 +02:00
github-actions[bot] e30742adc3
Merge staging-next into staging 2021-04-26 12:06:35 +00:00
Lassulus ee04d772e4
Merge pull request #120489 from samueldr/fix/make-disk-image-auto-size
Fix make disk image automatic size
2021-04-26 10:34:15 +02:00
github-actions[bot] 1626c4772a
Merge staging-next into staging 2021-04-25 12:06:12 +00:00
Frederik Rietdijk c648f7ee2a Merge master into staging-next 2021-04-25 13:54:29 +02:00
Luke Granger-Brown 0cc25061b0
Merge pull request #114240 from sorki/containers/nested
nixos/nixos-containers: default boot.enableContainers to true
2021-04-25 11:37:01 +01:00
lassulus 5aa4273e4f treewide: use auto diskSize for make-disk-image
(cherry picked from commit f3aa040bcb)
2021-04-24 14:49:07 -04:00
Michael Raskin d04f1c4314
Merge pull request #101071 from ju1m/apparmor
apparmor: try again to fix and improve
2021-04-24 11:24:26 +00:00
github-actions[bot] d8d6ba0d2e
Merge master into staging-next 2021-04-24 06:05:30 +00:00
Luke Granger-Brown 4fb91cbafe Revert "treewide: use auto diskSize for make-disk-image"
This reverts commit f3aa040bcb.
2021-04-24 02:38:36 +00:00
Julien Moutinho 05d334cfe2 Revert "Revert "apparmor: fix and improve the service""
This reverts commit 420f89ceb2.
2021-04-23 07:17:55 +02:00
github-actions[bot] b95da5efb6
Merge master into staging-next 2021-04-22 18:14:27 +00:00
lassulus f3aa040bcb treewide: use auto diskSize for make-disk-image 2021-04-22 19:52:49 +02:00
github-actions[bot] 8248f4db36
Merge master into staging-next 2021-04-22 06:05:51 +00:00
Matej Urbas db5b547b25 nixos/amazon-init: add user-data shell script support 2021-04-18 10:19:06 +01:00
Philipp Mildenberger f5922de1d7 nixos/oci-containers: add support for environment files 2021-04-15 10:57:56 +02:00
Luke Granger-Brown 08b22e605b Merge remote-tracking branch 'upstream/staging-next' into down-integrate-staging 2021-04-12 18:49:01 +00:00
Jörg Thalheim 9af991a1b1
Merge pull request #117618 from Mic92/docker
nixos/docker: re-add network.target
2021-04-09 12:43:13 +01:00
Dmitry Kalinkin 219590673c
Merge branch 'staging-next' into staging
Conflicts:
	pkgs/development/python-modules/panel/default.nix
	pkgs/os-specific/linux/kernel/generic.nix
	pkgs/servers/home-assistant/default.nix
2021-04-08 22:42:26 -04:00
Luke Granger-Brown 1ce6b05ea1 nixos/libvirtd: add package option
At the moment, it's not possible to override the libvirtd package used
without supplying a nixpkgs overlay. Adding a package option makes
libvirtd more consistent and allows enabling e.g. ceph and iSCSI support
more easily.
2021-04-09 01:20:19 +02:00
Phillip Cloud 7c36ce8d3a nixos/containers: move extraConfig to settings model 2021-04-07 16:08:18 -04:00
Jan Tojnar 70babe5bcf Merge branch 'staging-next' into staging 2021-04-06 16:25:41 +02:00
Alyssa Ross 25208eeaba linux: remove xen_dom0 feature entirely
Xen is now enabled unconditionally on kernels that support it, so the
xen_dom0 feature doesn't do anything.  The isXen attribute will now
produce a deprecation warning and unconditionally return true.
Passing in a custom value for isXen is no longer supported.
2021-04-05 09:25:39 +00:00
Sandro Jäckel 9378fdf87e
iproute: deprecate alias 2021-04-04 01:43:46 +02:00
Izorkin e65d8e4845
nixos/qemu-guest-agent: add statedir 2021-03-31 20:07:17 +03:00
Sandro da7bf30372
nixos/containers: update example path to match defaults 2021-03-29 03:40:44 +02:00
Jörg Thalheim 0f4872b4c4
nixos/docker: re-add network.target
Currently if docker starts concurrently with
firewall.service/systemd-networkd it breaks both due to iptables/netlink
logs.
2021-03-25 22:06:54 +01:00
Domen Kožar b992a92fa0
Merge pull request #117021 from AmineChikhaoui/gcp-cloud-images
add new Google Cloud image for the current release
2021-03-25 10:42:06 +01:00
zowoq 4b11122749 nixos/containers: add catatonit / init_path
https://github.com/containers/common/blob/master/docs/containers.conf.5.md

- Also drop unneeded true from ociSeccompBpfHook
2021-03-21 20:57:28 +01:00
AmineChikhaoui 606b49721f
add new Google Cloud image for the current release
update the create-gce.sh script with the ability to create public images
out of a GS object.
2021-03-21 14:04:09 -04:00
Lassulus ba6d848c40
Merge pull request #112332 from urbas/amazon-init-options
virtualization/amazon-init: enable option
2021-03-07 18:39:05 +01:00
Johan Thomsen 7b5c38e973 nixos/kubernetes: docker -> containerd
also, nixos/containerd: module init
2021-03-07 12:51:14 +10:00
rnhmjoj c0c288b70b nixos/libvirtd: remove systemd-udev-settle
This dependency has been added in 65eae4d, when NixOS switched to
systemd, as a substitute for the previous udevtrigger and hasn't been
touched since. It's probably unneeded as the upstream unit[1] doesn't
do it and I haven't found any mention of any problem in NixOS or the
upstream issue trackers.

[1]: https://gitlab.com/libvirt/libvirt/-/blob/master/src/remote/libvirtd.service.in
2021-03-05 23:44:28 +01:00
Richard Marko fc2fa3cda5 nixos/nixos-containers: default boot.enableContainers to true
Related to #85746 which addresses documentation issue,
digging deeper for a reason why this was disabled
was simply because it wasn't working which is not the case anymore.
2021-03-04 12:03:03 +01:00
rnhmjoj 24e45e308d
nixos/lxd: fixup of 4adcb006 2021-03-03 01:16:41 +01:00
Michele Guerini Rocco ccc4bbdbe6
Merge pull request #114772 from rnhmjoj/anbox-no-udev-settle
nixos/anbox: remove systemd-udev-settle
2021-03-02 08:04:08 +01:00
rnhmjoj 879fcdf778
nixos/anbox: remove systemd-udev-settle
The anbox session manager seems to start without issues when
systemd-udev-settle is masked or the dependency removed.
2021-03-01 19:29:32 +01:00
rnhmjoj b9dc818bd5
nixos/lxd: make start timeout configurable 2021-02-28 14:02:56 +01:00
rnhmjoj 4adcb00642
nixos/lxd: cleanup and misc fixes
- Actually use the zfsSupport option
- Add documentation URI to lxd.service
- Add lxd.socket to enable socket activatation
- Add proper dependencies and remove systemd-udev-settle from lxd.service
- Set up /var/lib/lxc/rootfs using systemd.tmpfiles
- Configure safe start and shutdown of lxd.service
- Configure restart on failures of lxd.service
2021-02-28 14:02:56 +01:00
Florian Klink 1624ae8a96
Merge pull request #100433 from Patryk27/fixes/38509
nixos/containers: allow containers with long names to create private networks
2021-02-26 21:35:07 +01:00
Patryk Wychowaniec 336ef2de99
nixos/containers: allow containers with long names to create private networks
Launching a container with a private network requires creating a
dedicated networking interface for it; name of that interface is derived
from the container name itself - e.g. a container named `foo` gets
attached to an interface named `ve-foo`.

An interface name can span up to IFNAMSIZ characters, which means that a
container name must contain at most IFNAMSIZ - 3 - 1 = 11 characters;
it's a limit that we validate using a build-time assertion.

This limit has been upgraded with Linux 5.8, as it allows for an
interface to contain a so-called altname, which can be much longer,
while remaining treated as a first-class citizen.

Since altnames have been supported natively by systemd for a while now,
due diligence on our side ends with dropping the name-assertion on newer
kernels.

This commit closes #38509.

systemd/systemd#14467
systemd/systemd#17220
https://lwn.net/Articles/794289/
2021-02-26 17:48:49 +01:00
WORLDofPEACE 1546bea850
Merge pull request #111462 from jakobrs/msize
nixos/qemu-vm: add virtualisation.msize option
2021-02-25 21:06:27 -05:00
nicoo d7c15d0eec nixos/hyperv-guest: rngd was removed, no need to disable it 2021-02-21 01:34:56 +01:00
Florian Klink d0be6dcd70
Merge pull request #110784 from talyz/gce-fetch-ssh-keys
google-compute-config: Reintroduce fetch-ssh-keys
2021-02-20 22:19:53 +01:00
talyz 95f96de78e
gce/fetch-ssh-keys: Put script in separate file, use PrivateTmp...
...check the script with shfmt and shellcheck + some other minor
refactoring.
2021-02-19 15:17:12 +01:00
ilian 29a6c9b9a3 nixos/hypervGuest: add Microsoft Synthetic Keyboard driver
Ensure that the HyperV keyboard driver is available in the early
stages of the boot process. This allows the user to enter a disk
encryption passphrase or repair a boot problem in an interactive
shell.
2021-02-17 08:01:34 +00:00
Matej Urbas a6766bee7b virtualization/amazon-init: enable option 2021-02-15 18:44:34 +00:00
Maciej Krüger 8429831b67
Merge pull request #112746 from mkg20001/qemu-extra-disks 2021-02-14 13:20:44 +01:00
zowoq 37f1ed7ca4 nixos/podman: install systemd files
- install podman service and socket
- install podman tmpfile
2021-02-14 06:57:39 +10:00
Maciej Krüger 45b8e83128
qemu-vm: add virtualisation.fileSystems to allow extra vm mounts 2021-02-11 11:02:45 +01:00
adisbladis 6caa6cb3f5
Merge pull request #111924 from saschagrunert/cri-o-oci-hook
nixos/cri-o: add OCI seccomp bpf hook support
2021-02-06 12:03:44 +01:00
adisbladis 3c6035cd9a
Merge pull request #106767 from erikarvstedt/fix-container-pkgs-2
nixos-container: fix `nixpkgs` container options being ignored
2021-02-06 11:57:14 +01:00