From eae6fdeeda67afe84e4830be2adedde6656834ba Mon Sep 17 00:00:00 2001 From: Jonas Pfenniger Date: Mon, 4 Feb 2013 17:32:43 +0000 Subject: [PATCH] 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. --- definitions/nixos32/configuration.nix | 4 +--- definitions/nixos32/definition.rb | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/definitions/nixos32/configuration.nix b/definitions/nixos32/configuration.nix index 74db03c..31b1807 100644 --- a/definitions/nixos32/configuration.nix +++ b/definitions/nixos32/configuration.nix @@ -1,8 +1,7 @@ { config, pkgs, ... }: { - require = [ ]; + require = [ ./hardware-configuration.nix ]; boot = { - initrd.kernelModules = [ "ata_piix" "ahci" ]; loader.grub.device = "/dev/sda"; }; environment.systemPackages = with pkgs; [ git ruby rubygems gnumake gcc ]; @@ -20,7 +19,6 @@ services = { dbus.enable = true; openssh.enable = true; - virtualbox.enable = true; }; users = { extraGroups = [ { name = "vagrant"; } { name = "vboxsf"; } ]; diff --git a/definitions/nixos32/definition.rb b/definitions/nixos32/definition.rb index 8a46d79..97625a2 100644 --- a/definitions/nixos32/definition.rb +++ b/definitions/nixos32/definition.rb @@ -16,9 +16,8 @@ session = { 'w', '', 'mkfs.ext4 -j -L nixos /dev/sda1', '', 'mount LABEL=nixos /mnt', '', - 'curl -O http://%IP%:%PORT%/configuration.nix &&', '', - 'mkdir -p /mnt/etc/nixos &&', '', - 'mv configuration.nix /mnt/etc/nixos &&', '', + 'nixos-option --install', '', + 'curl http://%IP%:%PORT%/configuration.nix > /mnt/etc/nixos/configuration.nix &&', '', 'nixos-install &&', '', 'reboot', '', ],