maxwell/testing.nix

31 lines
777 B
Nix
Raw Normal View History

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