From 64be5cc145d54b9d50cd61623daa9ec7a3d4e4b5 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 22 Feb 2023 20:41:17 +0100 Subject: nixos/alps: fix embarrasing typo --- nixos/modules/services/web-apps/alps.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') 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}" ]; }; }; -- cgit 1.4.1 From 89c8ef30a6a5d8210f16ce88154c682c26818fd1 Mon Sep 17 00:00:00 2001 From: Robert Schütz Date: Mon, 20 Feb 2023 09:48:39 -0800 Subject: nixos/imaginary: bind to localhost by default --- nixos/modules/services/networking/imaginary.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nixos') 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 { -- cgit 1.4.1 From f99e8bafe6f751c8ff56eeb4e0fb0415a8b805da Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 23 Sep 2022 14:37:36 -0700 Subject: nixos/installer: add sd-image-powerpc64le.nix This builds on top of nixpkgs mainline 00d83471803a8a308a52fc4b09b6ec41dfb36453 with the following two PRs cherry-picked: - https://github.com/NixOS/nixpkgs/pull/192670 - https://github.com/NixOS/nixpkgs/pull/192668 using the following command: ``` nix build -f nixos -L \ -I nixos-config=nixos/modules/installer/sd-card/sd-image-powerpc64le.nix \ config.system.build.sdImage ``` I was able to successfully boot the image, although it boots to a login prompt rather than a shell, and won't accept the empty password for `root`. I guess I'll have to figure out why that is. To boot the image: `zstd`-decompress the it, mount it, and use `kexec`: ``` cd boot/nixos kexec -l \ *-vmlinux \ --initrd *-initrd \ --dt-no-old-root \ --command-line="$(grep APPEND ../extlinux/extlinux.conf | sed 's_^ *APPEND *__')" ``` The machine I used for testing has only one storage device which is completely allocated to LVM. It appears that the NixOS ISO loader doesn't look for partition tables within LVM volumes. To work aroundn this, I had to extract the `ext4` image within the partition table within the `sd-card` image and put that in its own LVM volume. This likely won't be an obstacle for users who write the image to a USB stick or similar. --- .../installer/sd-card/sd-image-powerpc64le.nix | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 nixos/modules/installer/sd-card/sd-image-powerpc64le.nix (limited to 'nixos') 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 + ''; + }; +} -- cgit 1.4.1