From ed60af5f445767b512ebb8ce3490bc78838e6f8e Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 14 Oct 2019 13:38:27 +0200 Subject: l hilum.r: add isos from /boot/iso --- lass/1systems/hilum/config.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'lass/1systems/hilum') diff --git a/lass/1systems/hilum/config.nix b/lass/1systems/hilum/config.nix index 998fa1478..f57d275d8 100644 --- a/lass/1systems/hilum/config.nix +++ b/lass/1systems/hilum/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, pkgs, ... }: { imports = [ @@ -14,15 +14,19 @@ krebs.build.host = config.krebs.hosts.hilum; - boot.loader.grub.extraEntries = '' - menuentry "grml" { - iso_path=/isos/grml.iso - export iso_path - search --set=root --file $iso_path - loopback loop $iso_path - root=(loop) - configfile /boot/grub/loopback.cfg - loopback --delete loop - } - ''; + boot.loader.grub = { + extraEntries = '' + submenu isos { + source /grub/autoiso.cfg + } + ''; + extraFiles."/grub/autoiso.cfg" = (pkgs.stdenv.mkDerivation { + name = "autoiso.cfg"; + src = pkgs.grub2.src; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + cp docs/autoiso.cfg $out + ''; + }); + }; } -- cgit v1.2.3