reorder stuff

This commit is contained in:
Andreas Zweili 2021-11-23 20:57:23 +01:00
parent d0e20bffde
commit 26938c2cec
3 changed files with 40 additions and 33 deletions

View File

@ -4,27 +4,29 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = boot.initrd.availableKernelModules = [
[ (modulesPath + "/installer/scan/not-detected.nix") "aesni_intel"
"ahci"
"cryptd"
"sd_mod"
"usb_storage"
"xhci_pci"
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "aesni_intel" "cryptd" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2"; boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/BOOT"; device = "/dev/disk/by-label/BOOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-label/swap"; } { device = "/dev/disk/by-label/swap"; }
]; ];
} }

View File

@ -11,8 +11,10 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "nixos-vm"; # Define your hostname. networking = {
networking.interfaces.enp0s3.useDHCP = true; hostName = "nixos-vm";
interfaces.enp0s3.useDHCP = true;
};
environment.variables = { environment.variables = {
ZWEILI_HARDWARE = "vm"; ZWEILI_HARDWARE = "vm";

View File

@ -4,25 +4,28 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ ]; boot.initrd.availableKernelModules = [
"ata_piix"
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; "ohci_pci"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/BOOT"; device = "/dev/disk/by-label/BOOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-label/swap"; } { device = "/dev/disk/by-label/swap"; }
]; ];
virtualisation.virtualbox.guest.enable = true; virtualisation.virtualbox.guest.enable = true;