summary refs log tree commit diff
path: root/nixos/modules/installer/tools/nixos-generate-config.pl
diff options
context:
space:
mode:
authorSilvan Mosberger <infinisil@icloud.com>2018-08-05 22:59:46 +0200
committerGitHub <noreply@github.com>2018-08-05 22:59:46 +0200
commit47b3cdf9be5c6a07dd233cdf1b592360f730caae (patch)
tree5cc7ab36d08024dcfefa5cfefbe9dc5c668827e3 /nixos/modules/installer/tools/nixos-generate-config.pl
parent4460f727b9d93b089b2298e3b5a92f7fb06d4461 (diff)
parent29af6a608038bc126bd47ed21b48b95c3811fdd1 (diff)
downloadnixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar.gz
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar.bz2
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar.lz
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar.xz
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.tar.zst
nixpkgs-47b3cdf9be5c6a07dd233cdf1b592360f730caae.zip
Merge pull request #44108 from bennofs/gen-config-extlinux
nixos-generate-config: detect extlinux bootloader
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index cbe145d5a33..bb201d97ded 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -537,6 +537,13 @@ if ($showHardwareConfig) {
   boot.loader.systemd-boot.enable = true;
   boot.loader.efi.canTouchEfiVariables = true;
 EOF
+        } elsif (-e "/boot/extlinux") {
+            $bootLoaderConfig = <<EOF;
+  # Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
+  boot.loader.grub.enable = false;
+  # Enables the generation of /boot/extlinux/extlinux.conf
+  boot.loader.generic-extlinux-compatible.enable = true;
+EOF
         } elsif ($virt ne "systemd-nspawn") {
             $bootLoaderConfig = <<EOF;
   # Use the GRUB 2 boot loader.