diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-02-22 18:47:53 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-02-22 18:47:53 +0000 |
commit | 43c723b3c60350eb72b11e658b2e6a122fda6bfc (patch) | |
tree | afc0f8933110431cfbe7f246720077d0f2a82221 /nixos/modules/system/boot/loader/grub/install-grub.pl | |
parent | 6141939d6e0a77c84905efd560c03c3032164ef1 (diff) | |
download | nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar.gz nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar.bz2 nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar.lz nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar.xz nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.tar.zst nixlib-43c723b3c60350eb72b11e658b2e6a122fda6bfc.zip |
s6 experiments sixos
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/install-grub.pl')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index bda6a3136407..9ad86763f06e 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -372,6 +372,10 @@ sub addEntry { "systemConfig=" . Cwd::abs_path($path) . " " . "init=" . Cwd::abs_path("$path/init") . " " . readFile("$path/kernel-params"); + my $kernelParams6 = + "systemConfig=" . Cwd::abs_path($path) . " " . + "init=" . Cwd::abs_path($path) . "/s6/init " . + readFile("$path/kernel-params"); my $xenParams = $xen && -e "$path/xen-params" ? readFile("$path/xen-params") : ""; if ($grubVersion == 1) { @@ -393,6 +397,19 @@ sub addEntry { $conf .= " multiboot $xen $xenParams\n" if $xen; $conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams\n"; $conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n"; + $conf .= "}\n"; + $conf .= "menuentry \"$name - s6\" {\n"; + $conf .= $grubBoot->search . "\n"; + if ($copyKernels == 0) { + $conf .= $grubStore->search . "\n"; + } + if ($extraInitrd) { + $conf .= $extraInitrdPath->search . "\n"; + } + $conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig; + $conf .= " multiboot $xen $xenParams\n" if $xen; + $conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams6\n"; + $conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n"; $conf .= "}\n\n"; } } |