2016-01-07 17:34:56 +01:00
|
|
|
# Usage:
|
|
|
|
# NIX_PATH=secrets=/home/makefu/secrets/wry:nixpkgs=/var/src/nixpkgs nix-build -A users.makefu.pnp.config.system.build.vm
|
|
|
|
# result/bin/run-pnp-vm -virtfs local,path=/home/makefu/secrets/pnp,security_model=none,mount_tag=secrets
|
2015-07-28 20:19:54 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
2016-01-07 17:34:56 +01:00
|
|
|
[
|
2016-02-15 16:27:11 +01:00
|
|
|
../.
|
2015-10-28 15:05:15 +01:00
|
|
|
../2configs/headless.nix
|
2016-01-07 17:34:56 +01:00
|
|
|
../../krebs/3modules/Reaktor.nix
|
2015-08-17 23:22:49 +02:00
|
|
|
|
2016-01-07 17:34:56 +01:00
|
|
|
# these will be overwritten by qemu-vm.nix but will be used if the system
|
|
|
|
# is directly deployed
|
2015-09-04 23:06:43 +02:00
|
|
|
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
|
|
|
../2configs/fs/vm-single-partition.nix
|
|
|
|
|
2016-07-20 17:18:57 +02:00
|
|
|
../2configs/tinc/retiolum.nix
|
|
|
|
|
2016-01-07 17:34:56 +01:00
|
|
|
# config.system.build.vm
|
2016-07-20 17:18:57 +02:00
|
|
|
(toString <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>)
|
2015-07-28 20:19:54 +02:00
|
|
|
];
|
2015-10-26 00:47:10 +01:00
|
|
|
|
2016-01-07 17:34:56 +01:00
|
|
|
virtualisation.graphics = false;
|
|
|
|
# also export secrets, see Usage above
|
|
|
|
fileSystems = pkgs.lib.mkVMOverride {
|
|
|
|
"${builtins.toString <secrets>}" =
|
|
|
|
{ device = "secrets";
|
|
|
|
fsType = "9p";
|
|
|
|
options = "trans=virtio,version=9p2000.L,cache=loose";
|
|
|
|
neededForBoot = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-01-21 21:57:59 +01:00
|
|
|
krebs.Reaktor.debug = {
|
2016-01-07 17:34:56 +01:00
|
|
|
debug = true;
|
|
|
|
extraEnviron = {
|
2016-11-11 08:47:46 +01:00
|
|
|
REAKTOR_HOST = "ni.r";
|
2016-01-07 17:34:56 +01:00
|
|
|
};
|
|
|
|
plugins = with pkgs.ReaktorPlugins; [ stockholm-issue nixos-version sed-plugin ];
|
|
|
|
channels = [ "#retiolum" ];
|
2015-09-27 21:50:40 +02:00
|
|
|
};
|
2015-09-04 23:06:43 +02:00
|
|
|
|
2015-07-28 20:19:54 +02:00
|
|
|
krebs.build.host = config.krebs.hosts.pnp;
|
2015-07-29 11:56:31 +02:00
|
|
|
|
2015-08-05 14:56:38 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [
|
2016-03-15 13:20:14 +01:00
|
|
|
25
|
2015-08-07 12:53:02 +02:00
|
|
|
];
|
2015-08-17 23:22:49 +02:00
|
|
|
|
2015-07-28 20:19:54 +02:00
|
|
|
}
|