Skip to content

Instantly share code, notes, and snippets.

@calvinchengx
Last active August 29, 2015 14:23
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 calvinchengx/d2dc4bc505e6a40e1933 to your computer and use it in GitHub Desktop.
Save calvinchengx/d2dc4bc505e6a40e1933 to your computer and use it in GitHub Desktop.
hardware config for direct disk (SCSI) boot on Linode KVM
# Do not modify this file! It was generated by �~@~Xnixos-generate-config�~@~Y
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
#boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" ];
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_blk"
"9p" "9pnet_virtio" "virtio-scsi" ];
boot.initrd.kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ]
;
boot.initrd.postDeviceCommands =
''
# Set the system time from the hardware clock to work around a
# bug in qemu-kvm > 1.5.2 (where the VM clock is initialised
# to the *boot time* of the host).
hwclock -s
'';
boot.kernelModules = [ "kvm_intel" ];
boot.kernelParams = [ "console=ttyS0" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/741fb099-7db1-4ac1-99ee-b6f681cd6210";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6df2aba5-c089-4331-887e-9ed74baecdca";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/1c795ab7-fc09-43b5-a435-60fc4b53e76b"; }
];
nix.maxJobs = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment