summary refs log tree commit diff
path: root/nixos/modules/system/boot/binfmt.nix
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
* Merge pull request #143060 from zhaofengli/binfmt-argv00x4A6F2022-01-06
|\ | | | | nixos/binfmt: Add QEMU wrapper to preserve argv[0]
| * nixos/binfmt: Preserve argv[0] when using QEMUZhaofeng Li2021-12-01
| |
* | NixOS: Document impurity issues with boot.binfmt.emulatedSystems (#142778)Christian Kögler2021-11-09
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | * NixOS: Document impurity issues with boot.binfmt.emulatedSystems * Update nixos/modules/system/boot/binfmt.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com> * Update nixos/modules/system/boot/binfmt.nix Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com> * Update nixos/modules/system/boot/binfmt.nix Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com> * Update nixos/modules/system/boot/binfmt.nix Co-authored-by: markuskowa <markus.kowalewski@gmail.com> * Apply suggestions from code review Co-authored-by: markuskowa <markus.kowalewski@gmail.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com> Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
* nixos/binfmt: run binfmt activation script after mounting /runKazutoshi Noguchi2021-07-06
| | | | | | | | binfmt activation script creates /run/binfmt before mounting /run when system activation. To fix it I added dependency to specialfs to binfmt activation script.
* nixos/binfmt: add bash to sandboxPathsMatthew Bauer2021-01-24
| | | | | | bash is needed to run the new binfmt shell script. Fixes #110540
* nixos/binfmt.nix: fix running commands in binfmtMatthew Bauer2020-12-31
| | | | | | | To allow arguments in binfmt, we need to put the command in a shell script. This uses exec to run the binfmt interpreter. Fixes #90683
* nixos/binfmt: move systemd-binfmt.service to binfmt moduleFlorian Klink2020-05-18
| | | | | | | | | | | | Also, remove the dangling systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.mount" ]; in systemd.nix. If boot.binfmt.registrations != {}, systemd will install proc-sys-fs-binfmt_misc.automount, which will auto-mount `/proc/sys/fs/binfmt_misc` as soon as systemd-binfmt tries to access it. Fixes https://github.com/NixOS/nixpkgs/issues/87687 Fixes https://github.com/NixOS/nixops/issues/574
* nixos/treewide: Move rename.nix imports to their respective modulesSilvan Mosberger2019-12-10
| | | | | | | | A centralized list for these renames is not good because: - It breaks disabledModules for modules that have a rename defined - Adding/removing renames for a module means having to find them in the central file - Merge conflicts due to multiple people editing the central file
* nixos/modules: Remove all usages of types.stringSilvan Mosberger2019-08-31
| | | | | | And replace them with a more appropriate type Also fix up some minor module problems along the way
* nixos/binfmt: update release notes and provide examplesMatthew Bauer2019-07-17
|
* nixos/binfmt: handle wasm binariesMatthew Bauer2019-07-17
| | | | | | | | | | This adds handling for WASM binaries to binfmt’s emulatedSystems. To enable, add this to your configuration: boot.binfmt.emulatedSystems = [ "wasm32-wasi" ]; After rebuilding with nixos-rebuild switch, you can run wasm binaries directly.
* nixos/binfmt: fixupMatthew Bauer2019-05-10
|
* binfmt: add more magics and masksMatthew Bauer2019-05-10
| | | | | | New ones taken from this script: https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh
* nixos/binfmt: handle emulatedSystemsMatthew Bauer2019-05-10
| | | | Fixes #61248
* nixos/binfmt: Initial binfmt_msc support.Shea Levy2018-02-18