maxwell/testing.nix

31 lines
777 B
Nix

{ pkgs, lib, ... }:
{
imports = [
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
./configuration.nix
];
# VM hardware setup
virtualisation.memorySize = 4000; # MB
virtualisation.graphics = false;
virtualisation.cores = 4;
virtualisation.msize = 1 * 1024 * 1024;
# Ensure secrets are accessible by the
# activation scripts at runtime.
virtualisation.sharedDirectories.secrets =
{ source = toString ./secrets;
target = toString ./secrets;
};
# These don't work in a virtual machine
systemd.services.smartd.enable = lib.mkForce false;
systemd.services.apcupsd.enable = lib.mkForce false;
# Automatically resize the console
environment.systemPackages = [ pkgs.xterm ];
environment.shellInit = "resize > /dev/null";
}