2016-01-07 16:34:56 +00: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-24 08:52:43 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2015-07-24 21:03:50 +00:00
|
|
|
imports =
|
2016-01-07 16:34:56 +00:00
|
|
|
[
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu>
|
|
|
|
<stockholm/makefu/2configs/headless.nix>
|
2016-01-07 16:34:56 +00:00
|
|
|
../../krebs/3modules/Reaktor.nix
|
2015-08-17 21:22:49 +00:00
|
|
|
|
2016-01-07 16:34:56 +00:00
|
|
|
# these will be overwritten by qemu-vm.nix but will be used if the system
|
|
|
|
# is directly deployed
|
2015-09-04 21:06:43 +00:00
|
|
|
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/fs/vm-single-partition.nix>
|
2015-09-04 21:06:43 +00:00
|
|
|
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/tinc/retiolum.nix>
|
2016-07-20 15:18:57 +00:00
|
|
|
|
2016-01-07 16:34:56 +00:00
|
|
|
# config.system.build.vm
|
2016-07-20 15:18:57 +00:00
|
|
|
(toString <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>)
|
2015-07-24 21:03:50 +00:00
|
|
|
];
|
2015-10-25 23:47:10 +00:00
|
|
|
|
2016-01-07 16:34:56 +00: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 20:57:59 +00:00
|
|
|
krebs.Reaktor.debug = {
|
2016-01-07 16:34:56 +00:00
|
|
|
debug = true;
|
|
|
|
extraEnviron = {
|
2016-11-11 07:47:46 +00:00
|
|
|
REAKTOR_HOST = "ni.r";
|
2016-01-07 16:34:56 +00:00
|
|
|
};
|
|
|
|
plugins = with pkgs.ReaktorPlugins; [ stockholm-issue nixos-version sed-plugin ];
|
|
|
|
channels = [ "#retiolum" ];
|
2015-09-27 19:50:40 +00:00
|
|
|
};
|
2015-09-04 21:06:43 +00:00
|
|
|
|
2015-07-26 16:18:41 +00:00
|
|
|
krebs.build.host = config.krebs.hosts.pnp;
|
2015-07-29 09:56:31 +00:00
|
|
|
|
2015-08-05 12:56:38 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [
|
2016-03-15 12:20:14 +00:00
|
|
|
25
|
2015-08-07 10:53:02 +00:00
|
|
|
];
|
2015-08-17 21:22:49 +00:00
|
|
|
|
2015-07-24 08:52:43 +00:00
|
|
|
}
|