about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-02-23 06:01:36 +0000
committerGitHub <noreply@github.com>2023-02-23 06:01:36 +0000
commit36f198081c5c954c4dae61a1da3f80d5bfc54079 (patch)
tree8b049737066d68fa17612fe2c0d6488cbd02b284 /nixos
parentcee7ce609da33494cc8a5e569f6ffbccfdc1548c (diff)
parent010946fcbd99c7dd20417ad387cf395c0d59d1b9 (diff)
downloadnixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar.gz
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar.bz2
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar.lz
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar.xz
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.tar.zst
nixlib-36f198081c5c954c4dae61a1da3f80d5bfc54079.zip
Merge staging-next into staging
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/installer/sd-card/sd-image-powerpc64le.nix49
-rw-r--r--nixos/modules/services/networking/imaginary.nix9
-rw-r--r--nixos/modules/services/web-apps/alps.nix2
3 files changed, 56 insertions, 4 deletions
diff --git a/nixos/modules/installer/sd-card/sd-image-powerpc64le.nix b/nixos/modules/installer/sd-card/sd-image-powerpc64le.nix
new file mode 100644
index 000000000000..143c678e43fb
--- /dev/null
+++ b/nixos/modules/installer/sd-card/sd-image-powerpc64le.nix
@@ -0,0 +1,49 @@
+# To build, use:
+# nix-build nixos -I nixos-config=nixos/modules/installer/sd-card/sd-image-powerpc64le.nix -A config.system.build.sdImage
+{ config, lib, pkgs, ... }:
+
+{
+  imports = [
+    ../../profiles/base.nix
+    ../../profiles/installation-device.nix
+    ./sd-image.nix
+  ];
+
+  boot.loader = {
+    # powerpc64le-linux typically uses petitboot
+    grub.enable = false;
+    generic-extlinux-compatible = {
+      # petitboot is not does not support all of the extlinux extensions to
+      # syslinux, but its parser is very forgiving; it essentially ignores
+      # whatever it doesn't understand.  See below for a filename adjustment.
+      enable = true;
+    };
+  };
+
+  boot.consoleLogLevel = lib.mkDefault 7;
+  boot.kernelParams = [ "console=hvc0" ];
+
+  sdImage = {
+    populateFirmwareCommands = "";
+    populateRootCommands = ''
+      mkdir -p ./files/boot
+      ${config.boot.loader.generic-extlinux-compatible.populateCmd} \
+        -c ${config.system.build.toplevel} \
+        -d ./files/boot
+    ''
+    # https://github.com/open-power/petitboot/blob/master/discover/syslinux-parser.c
+    # petitboot will look in these paths (plus all-caps versions of them):
+    #  /boot/syslinux/syslinux.cfg
+    #  /syslinux/syslinux.cfg
+    #  /syslinux.cfg
+    + ''
+      mv ./files/boot/extlinux ./files/boot/syslinux
+      mv ./files/boot/syslinux/extlinux.conf ./files/boot/syslinux/syslinux.cfg
+    ''
+    # petitboot does not support relative paths for LINUX or INITRD; it prepends
+    # a `/` when parsing these fields
+    + ''
+      sed -i 's_^\(\W\W*\(INITRD\|initrd\|LINUX\|linux\)\W\)\.\./_\1/boot/_' ./files/boot/syslinux/syslinux.cfg
+    '';
+  };
+}
diff --git a/nixos/modules/services/networking/imaginary.nix b/nixos/modules/services/networking/imaginary.nix
index 5437da572778..a655903d1031 100644
--- a/nixos/modules/services/networking/imaginary.nix
+++ b/nixos/modules/services/networking/imaginary.nix
@@ -10,9 +10,12 @@ in {
 
     address = mkOption {
       type = types.str;
-      default = "";
-      description = mdDoc "Bind address. Corresponds to the `-a` flag.";
-      example = "localhost";
+      default = "localhost";
+      description = mdDoc ''
+        Bind address. Corresponds to the `-a` flag.
+        Set to `""` to bind to all addresses.
+      '';
+      example = "[::1]";
     };
 
     port = mkOption {
diff --git a/nixos/modules/services/web-apps/alps.nix b/nixos/modules/services/web-apps/alps.nix
index 1a58df2da1d2..05fb676102df 100644
--- a/nixos/modules/services/web-apps/alps.nix
+++ b/nixos/modules/services/web-apps/alps.nix
@@ -84,7 +84,7 @@ in {
         "-addr" "${cfg.bindIP}:${toString cfg.port}"
         "-theme" "${cfg.theme}"
         "imaps://${cfg.imaps.host}:${toString cfg.imaps.port}"
-        "smpts://${cfg.smtps.host}:${toString cfg.smtps.port}"
+        "smtps://${cfg.smtps.host}:${toString cfg.smtps.port}"
       ];
     };
   };