Skip to content
Snippets Groups Projects
hardware-virtual.nix 911 B
Newer Older
  • Learn to ignore specific revisions
  • { publicIPv4, ... }:
    
    { modulesPath, ... }:
    
      imports = [
        # modulesPath points at the upstream nixos/modules directory.
        "${modulesPath}/virtualisation/vagrant-guest.nix"
      ];
    
    
      virtualisation.virtualbox.guest.enable = true;
    
      boot.loader.grub.device = "/dev/sda";
    
      boot.initrd.availableKernelModules = [ "ata_piix" "sd_mod" "sr_mod" ];
    
      boot.kernel.sysctl = { "vm.swappiness" = 0; };
    
    
      # 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";
        };
    
      # We want to push packages with morph without having to sign them
      nix.trustedUsers = [ "@wheel" "root" "vagrant" ];
    }