summary refs log tree commit diff
path: root/nixos/modules/virtualisation/nixos-containers.nix
Commit message (Collapse)AuthorAge
* nixos/containers: use latest stateVersion as exampleK9002023-10-27
| | | | Hopefully this way we don't confuse people into thinking you have to set it to 21.05.
* nixos/nixos-containers: add restartIfChanged optionDonovan Glover2023-10-11
| | | | | | | This commit makes auto-restarting declarative containers optional. This is useful when you don't want changes to your config to automatically restart the container and thus stop any applications running inside it.
* treewide: use optionalAttrs instead of 'else {}'Felix Buehler2023-06-25
|
* treewide: pass system argument to eval-config.nixFabian Möller2023-05-12
| | | | | | | Calling `eval-config.nix` without a `system` from a Nix flake fails with `error: attribute 'currentSystem' missing` since #230523. Setting `system = null` removes the use of `currentSystem` and instead uses the value from the `nixpkgs` module.
* treewide: use more lib.optionalStringFelix Buehler2023-04-07
|
* nixos/nixos-containers: add specialArgs option (#216677)Yureka2023-02-19
|
* Merge pull request #185129 from Munksgaard/fix-nixos-containeradisbladis2022-11-17
|\ | | | | nixos-containers: Make sure same version of nixos-container is used
| * nixos-containers: Make sure same version of nixos-container is usedPhilip Munksgaard2022-08-04
| | | | | | | | Fixes #185126 (I hope)
* | Merge pull request #198526 from farnoy/nixos-container-unified-cgroupsEelco Dolstra2022-11-10
|\ \ | | | | | | [nixos-container] Make nixos containers use unified cgroupsv2
| * | nixos-container: force systemd-nspawn to use unified cgroups hierarchyJakub Okoński2022-11-06
| | |
* | | Merge pull request #195681 from maifel-maifel/mr-containers-hostPlatformRobert Hensing2022-10-27
|\ \ \ | | | | | | | | nixos/containers: now uses nixpkgs.hostPlatform
| * | | nixos/containers: support nixpkgs.hostPlatformdigital2022-10-18
| |/ / | | | | | | | | | | | | | | | Use hostPlatform if both the host and the containers nixpkgs supports hostPlatform, otherwise fall back to localSystem. This preseves backwards compatibility.
* | | Merge pull request #167047 from helsinki-systems/drop/postgresql10Mario Rodas2022-10-06
|\ \ \ | |/ / |/| | postgresql: remove 10.x
| * | treewide: change postgresql_10 in documentation and examples to postgresql_14ajs1242022-08-15
| | |
* | | nixos/*: automatically convert option descriptionspennae2022-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | nixos/*: automatically convert option docspennae2022-08-19
|/ /
* | Merge pull request #185474 from pennae/option-docs-mdpennae2022-08-12
|\ \ | | | | | | nixos/*: more options md conversion
| * | nixos/*: automatically convert option docspennae2022-08-06
| | |
| * | nixos/*: normalize manpage references to single-line formpennae2022-08-05
| | | | | | | | | | | | | | | | | | | | | now nix-doc-munge will not introduce whitespace changes when it replaces manpage references with the MD equivalent. no change to the manpage, changes to the HTML manual are whitespace only.
* | | Merge pull request #185153 from puppe/enable-container-warningadisbladis2022-08-10
|\ \ \ | |/ / |/| | nixos/nixos-containers: Fix ineffective warning
| * | nixos/nixos-containers: Fix ineffective warningMartin Puppe2022-08-04
| |/ | | | | | | | | | | | | | | | | A warning regarding enabling NixOS containers and virtualisation.containers at the same time with state versions < 22.05 had been added in commit 3c49151f154a3872eb278c214863d926a4f8abf6. But this warning had accidentally been defined in the wrong place, and the warning has therefore not actually been in effect. This commit fixes that.
* | nixos/*: automatically convert option docs to MDpennae2022-08-03
| | | | | | | | once again using nix-doc-munge (https://github.com/pennae/nix-doc-munge/commit/69d080323ae27c0d8da3967c62b925a9aedb2828)
* | nixos/*: replace <replaceable>s with «thing»pennae2022-08-03
|/ | | | | | | | we can't embed syntactic annotations of this kind in markdown code blocks without yet another extension. replaceable is rare enough to make this not much worth it, so we'll go with «thing» instead. the module system already uses this format for its placeholder names in attrsOf paths.
* Merge pull request #183491 from pennae/automatic-md-conversionspennae2022-08-02
|\ | | | | treewide: automatically md-convert option descriptions
| * treewide: automatically md-convert option descriptionspennae2022-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
* | nixos: Fix use of nixpkgs.localSystemRobert Hensing2022-07-10
|/ | | | | localSystem is ill-defined because unlike hostPlatform, its meaning is different in a cross or non-cross context.
* treewide: fix loss of precision in NixOS systemsAlyssa Ross2022-05-28
| | | | | | | | | | | | | | | | | | Prior to this patch: $ nix-instantiate --eval -E ' > with import ./. { > localSystem.config = "aarch64-unknown-linux-musl"; > }; > (nixos {}).config.nixpkgs.localSystem.config > ' "aarch64-unknown-linux-gnu" Because only the system triple was being passed through, the Musl part of the system specification was lost. This patch fixes various occurrences of NixOS evaluation when a Nixpkgs evaluation is already available, to pass through the full elaborated system attribute set, to avoid this loss of precision.
* nixos/nixos-containers: Add warning on unsupported state version comboadisbladis2022-04-27
|
* nixos-container: Use new configuration & state directoriesadisbladis2022-04-27
| | | | | | | | | We need to move NixOS containers somewhere else so these don't clash with Podman, Skopeo & other container software in the libpod & cri-o/cri-u/libcontainer ecosystems. The state directory move is not strictly a requirement but is good for consistency.
* postgresql_9_6: dropajs1242021-12-03
|
* nixos/doc: clean up defaults and examplesNaïm Favier2021-10-04
|
* nixos/containers: Increase startup timeout for imperative containersHedtke, Moritz2021-05-08
| | | | | 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.
* Merge pull request #121021 from pennae/container-sigtermFlorian Klink2021-04-30
|\ | | | | nixos/nix-containers: use SIGTERM to stop containers
| * nixos/nix-containers: use SIGTERM to stop containerspennae2021-04-28
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #114240 from sorki/containers/nestedLuke Granger-Brown2021-04-25
|\ \ | |/ |/| nixos/nixos-containers: default boot.enableContainers to true
| * nixos/nixos-containers: default boot.enableContainers to trueRichard Marko2021-03-04
| | | | | | | | | | | | 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.
* | iproute: deprecate aliasSandro Jäckel2021-04-04
| |
* | nixos/containers: update example path to match defaultsSandro2021-03-29
|/
* nixos/containers: allow containers with long names to create private networksPatryk Wychowaniec2021-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Merge pull request #106767 from erikarvstedt/fix-container-pkgs-2adisbladis2021-02-06
|\ | | | | nixos-container: fix `nixpkgs` container options being ignored
| * nixos-container: fix `nixpkgs` container options being ignoredErik Arvstedt2021-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of option `containers.<name>.pkgs`, the `nixpkgs.*` options (including `nixpkgs.pkgs`, `nixpkgs.config`, ...) were always ignored in container configs, which broke existing containers. This was due to `containers.<name>.pkgs` having two separate effects: (1) It sets the source for the modules that are used to evaluate the container. (2) It sets the `pkgs` arg (`_module.args.pkgs`) that is used inside the container modules. This happens even when the default value of `containers.<name>.pkgs` is unchanged, in which case the container `pkgs` arg is set to the pkgs of the host system. Previously, the `pkgs` arg was determined by the `containers.<name>.config.nixpkgs.*` options. This commit reverts the breaking change (2) while adding a backwards-compatible way to achieve (1). It removes option `pkgs` and adds option `nixpkgs` which implements (1). Existing users of `pkgs` are informed by an error message to use option `nixpkgs` or to achieve only (2) by setting option `containers.<name>.config.nixpkgs.pkgs`.
| * nixos-container: simplify 'pkgs' option typeErik Arvstedt2020-12-15
| | | | | | | | Set the default value directly instead of using a `null` proxy value.
| * nixos-containers: remove redundant eval-config argsErik Arvstedt2020-12-15
| | | | | | | | | | | | The values of these args are identical to the default values defined in `eval-config.nix`. Note especially that `lib` is not reevaluated.
* | treewide: fix double quoted strings in meta.descriptionvolth2021-01-24
| | | | | | | | Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
* | nixos/nixos-container: Always apply extraVeth ip configurationJens Nolte2020-12-19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes that `containers.<name>.extraVeths.<name>` configuration was not always applied. When configuring `containers.<name>.extraVeths.<name>` and not configuring one of `containers.<name>.localAddress`, `.localAddress6`, `.hostAddress`, `.hostAddress6` or `.hostBridge` the veth was created, but otherwise no configuration (i.e. no ip) was applied. nixos-container always configures the primary veth (when `.localAddress` or `.hostAddress` is set) to be the containers default gateway, so this fix is required to create a veth in containers that use a different default gateway. To test this patch configure the following container and check if the addresses are applied: ``` containers.testveth = { extraVeths.testveth = { hostAddress = "192.168.13.2"; localAddress = "192.168.13.1"; }; config = {...}:{}; }; ```
* nixos/*: fix indentationzowoq2020-11-23
|
* treewide: completely remove types.loaOfrnhmjoj2020-09-02
|
* nixos/networkd: rename the networkd dhcpConfig option to dhcpV4ConfigAndreas Rammhold2020-05-01
| | | | | | | | | | This follows upstreams change in documentation. While the `[DHCP]` section might still work it is undocumented and we should probably not be using it anymore. Users can just upgrade to the new option without much hassle. I had to create a bit of custom module deprecation code since the usual approach doesn't support wildcards in the path.
* nixos/manual: fix buildPiotr Bogdan2020-04-22
|
* nixos-containers: add docs about nested containersIngo Blechschmidt2020-04-22
|