Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created July 9, 2019 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/7905a4be3a8edd3cbc660f3197c8d870 to your computer and use it in GitHub Desktop.
Save cleverca22/7905a4be3a8edd3cbc660f3197c8d870 to your computer and use it in GitHub Desktop.
{ 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