about summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-14 13:45:54 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-14 13:45:54 +0200
commit8d56f2472e47a3f1f388b69c0ecc24421910d555 (patch)
tree6eabee7471ed3f7395156dc158a58205cca236f4 /nixos/modules/system
parent9bd78cb0488040ea996b27e82135396a45325af5 (diff)
parent930659b10bc7c875fd49b1cdae21a631b429c25a (diff)
downloadnixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.gz
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.bz2
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.lz
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.xz
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.zst
nixlib-8d56f2472e47a3f1f388b69c0ecc24421910d555.zip
Merge master into staging-next
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/binfmt.nix9
-rw-r--r--nixos/modules/system/boot/systemd-unit-options.nix2
-rw-r--r--nixos/modules/system/boot/systemd.nix2
3 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index d6c0f0504868..a550ffd6320f 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -115,6 +115,14 @@ let
       magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00'';
       mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
     };
+    wasm32-wasi = {
+      magicOrExtension = ''\x00asm'';
+      mask = ''\xff\xff\xff\xff'';
+    };
+    wasm64-wasi = {
+      magicOrExtension = ''\x00asm'';
+      mask = ''\xff\xff\xff\xff'';
+    };
     x86_64-windows = {
       magicOrExtension = ".exe";
       recognitionType = "extension";
@@ -226,6 +234,7 @@ in {
 
       emulatedSystems = mkOption {
         default = [];
+        example = [ "wasm32-wasi" "x86_64-windows" "aarch64-linux" ];
         description = ''
           List of systems to emulate. Will also configure Nix to
           support your new systems.
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
index ee4ae845a7d5..c1f2c98afcd8 100644
--- a/nixos/modules/system/boot/systemd-unit-options.nix
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -226,7 +226,7 @@ in rec {
 
     environment = mkOption {
       default = {};
-      type = with types; attrsOf (nullOr (either str (either path package)));
+      type = with types; attrsOf (nullOr (oneOf [ str path package ]));
       example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
       description = "Environment variables passed to the service's processes.";
     };
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 1025a038c4b3..1914827d0e5d 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -524,7 +524,7 @@ in
     };
 
     systemd.globalEnvironment = mkOption {
-      type = with types; attrsOf (nullOr (either str (either path package)));
+      type = with types; attrsOf (nullOr (oneOf [ str path package ]));
       default = {};
       example = { TZ = "CET"; };
       description = ''