{ pkgs, lib, ... }: let secrets = toString ./secrets; in { imports = [ ./configuration.nix ]; # VM hardware setup virtualisation.memorySize = "4000"; # MB virtualisation.graphics = false; virtualisation.cores = 4; virtualisation.msize = 1 * 1024 * 1024; virtualisation.qemu.options = [ # Ensure secrets are accessible by the # activation scripts at runtime. "-virtfs local,path=${secrets},security_model=none,mount_tag=secrets" ]; virtualisation.fileSystems."${secrets}" = { device = "secrets"; fsType = "9p"; options = [ "trans=virtio" "version=9p2000.L" ]; neededForBoot = true; }; # 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"; }