Created
July 9, 2019 10:44
-
-
Save cleverca22/7905a4be3a8edd3cbc660f3197c8d870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
let | |
nixpkgs2 = /home/clever/apps/nixpkgs-older; | |
netboot = import (nixpkgs2 + "/nixos/lib/eval-config.nix") { | |
modules = [ | |
(nixpkgs2 + "/nixos/modules/installer/netboot/netboot-minimal.nix") | |
module | |
]; | |
}; | |
module = { config, pkgs, lib, ... }: { | |
# you will want to add options here to support your filesystem | |
# and also maybe ssh to let you in | |
boot.supportedFilesystems = [ "zfs" ]; | |
boot.extraModulePackages = [ config.boot.kernelPackages.amdgpu-pro ]; | |
hardware.opengl.enable = true; | |
hardware.opengl.extraPackages = [ config.boot.kernelPackages.amdgpu-pro ]; | |
nixpkgs.config.allowUnfree = true; | |
hardware.enableAllFirmware = false; | |
hardware.enableRedistributableFirmware = lib.mkForce false; | |
system.extraDependencies = lib.mkForce []; | |
}; | |
in { | |
system.build.rescue-debug = netboot.config.system.build; | |
boot.loader.grub.extraEntries = '' | |
menuentry "Nixos Installer" { | |
linux ($drive1)/rescue-kernel init=${netboot.config.system.build.toplevel}/init ${toString netboot.config.boot.kernelParams} | |
initrd ($drive1)/rescue-initrd | |
} | |
''; | |
boot.loader.grub.extraFiles = { | |
"rescue-kernel" = "${netboot.config.system.build.kernel}/bzImage"; | |
"rescue-initrd" = "${netboot.config.system.build.netbootRamdisk}/initrd"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment