Use NixOS's hardware detect on install

I think it will be more flexible like that, veewee can also target kvm
and other virtualisation environments.
This commit is contained in:
Jonas Pfenniger 2013-02-04 17:32:43 +00:00
parent cd7fcd669a
commit eae6fdeeda
2 changed files with 3 additions and 6 deletions

View file

@ -1,8 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
require = [ <nixos/modules/installer/scan/not-detected.nix> ]; require = [ ./hardware-configuration.nix ];
boot = { boot = {
initrd.kernelModules = [ "ata_piix" "ahci" ];
loader.grub.device = "/dev/sda"; loader.grub.device = "/dev/sda";
}; };
environment.systemPackages = with pkgs; [ git ruby rubygems gnumake gcc ]; environment.systemPackages = with pkgs; [ git ruby rubygems gnumake gcc ];
@ -20,7 +19,6 @@
services = { services = {
dbus.enable = true; dbus.enable = true;
openssh.enable = true; openssh.enable = true;
virtualbox.enable = true;
}; };
users = { users = {
extraGroups = [ { name = "vagrant"; } { name = "vboxsf"; } ]; extraGroups = [ { name = "vagrant"; } { name = "vboxsf"; } ];

View file

@ -16,9 +16,8 @@ session = {
'w', '<Enter>', 'w', '<Enter>',
'mkfs.ext4 -j -L nixos /dev/sda1', '<Enter>', 'mkfs.ext4 -j -L nixos /dev/sda1', '<Enter>',
'mount LABEL=nixos /mnt', '<Enter>', 'mount LABEL=nixos /mnt', '<Enter>',
'curl -O http://%IP%:%PORT%/configuration.nix &&', '<Enter>', 'nixos-option --install', '<Enter>',
'mkdir -p /mnt/etc/nixos &&', '<Enter>', 'curl http://%IP%:%PORT%/configuration.nix > /mnt/etc/nixos/configuration.nix &&', '<Enter>',
'mv configuration.nix /mnt/etc/nixos &&', '<Enter>',
'nixos-install &&', '<Enter>', 'nixos-install &&', '<Enter>',
'reboot', '<Enter>', 'reboot', '<Enter>',
], ],