Skip to content
Snippets Groups Projects
hardware-virtual.nix 1003 B
Newer Older
  • Learn to ignore specific revisions
  • { publicIPv4, ... }:
    {
      imports = [ ./vagrant-guest.nix ];
    
      virtualisation.virtualbox.guest.enable = true;
    
      # Use the GRUB 2 boot loader.
      boot.loader.grub.enable = true;
      boot.loader.grub.version = 2;
      boot.loader.grub.device = "/dev/sda";
    
      boot.initrd.availableKernelModules = [ "ata_piix" "sd_mod" "sr_mod" ];
      boot.initrd.kernelModules = [ ];
    
      boot.kernel.sysctl = { "vm.swappiness" = 0; };
    
      boot.kernelModules = [ ];
      boot.extraModulePackages = [ ];
    
      # remove the fsck that runs at startup. It will always fail to run, stopping
      # your boot until you press *.
      boot.initrd.checkJournalingFS = false;
    
      networking.interfaces.enp0s8.ipv4.addresses = [{
        address = publicIPv4;
        prefixLength = 24;
      }];
    
      fileSystems."/storage" = { fsType = "tmpfs"; };
      fileSystems."/" =
        { device = "/dev/sda1";
          fsType = "ext4";
        };
      swapDevices = [ ];
    
      # We want to push packages with morph without having to sign them
      nix.trustedUsers = [ "@wheel" "root" "vagrant" ];
    }