1{ lib, modulesPath, pkgs, ... }:
2let
3 ssh-keys =
4 if builtins.pathExists ../../ssh-keys.nix
5 then # Outside sandbox
6 ../../ssh-keys.nix
7 else # In sandbox
8 ./ssh-keys.nix;
9
10 inherit (import ssh-keys pkgs)
11 snakeOilPrivateKey snakeOilPublicKey;
12in
13{
14 imports = [
15 (modulesPath + "/virtualisation/qemu-vm.nix")
16 (modulesPath + "/testing/test-instrumentation.nix")
17 ];
18 virtualisation.writableStore = true;
19 nix.settings.substituters = lib.mkForce [ ];
20 virtualisation.graphics = false;
21 documentation.enable = false;
22 services.qemuGuest.enable = true;
23 boot.loader.grub.enable = false;
24
25 services.openssh.enable = true;
26 users.users.root.openssh.authorizedKeys.keys = [
27 snakeOilPublicKey
28 ];
29 security.pam.services.sshd.limits =
30 [{ domain = "*"; item = "memlock"; type = "-"; value = 1024; }];
31}