Skip to content

Instantly share code, notes, and snippets.

@ixxie
Created August 10, 2018 09:25
Show Gist options
  • Save ixxie/e0d427c9c468a091358c32a02c95eff7 to your computer and use it in GitHub Desktop.
Save ixxie/e0d427c9c468a091358c32a02c95eff7 to your computer and use it in GitHub Desktop.
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.kernelParams = [ "net.ifnames=0" ]; # Don't rename interfaces
networking = {
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
nameservers = [ "8.8.8.8" "8.8.4.4" ];
interfaces.eth0 = {
ipv4.addresses = [
{
address = "95.216.152.211";
prefixLength = 27;
}
];
ipv6.addresses = [
{
address = "2a01:4f9:c010:1043::";
prefixLength = 64;
}
];
};
};
system.stateVersion = "18.09";
}
root@kexec:/mnt/etc/nixos]# nixos-install
building the configuration in /mnt/etc/nixos/configuration.nix...
GC Warning: Bad initial heap size 100000 - ignoring it.
[167 built, 373 copied (1188.0 MiB), 75.0 MiB DL]
GC Warning: Bad initial heap size 100000 - ignoring it.
copying channel...
GC Warning: Bad initial heap size 100000 - ignoring it.
installing the boot loader...
setting up /etc...
Initializing machine ID from KVM UUID.
updating GRUB 2 menu...
installing the GRUB 2 boot loader on /dev/sda...
Installing for i386-pc platform.
/nix/store/j5h48r8biwznxwlhyq3hi5mk5cj026k8-grub-2.02/sbin/grub-install: warning: File system `ext2' doesn't support embedding.
/nix/store/j5h48r8biwznxwlhyq3hi5mk5cj026k8-grub-2.02/sbin/grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/nix/store/j5h48r8biwznxwlhyq3hi5mk5cj026k8-grub-2.02/sbin/grub-install: error: will not proceed with blocklists.
/nix/store/cbs8gnyjs164wwcmz1yv7mszy7p37nr1-install-grub.pl: installation of GRUB on /dev/sda failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment