From 927587ec10a71b979ec1617a552c8c8ad6afd2d2 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Fri, 29 Mar 2019 14:24:28 +0100 Subject: [PATCH] Add network-libvirtd.nix for libvirtd environments. --- network-libvirtd.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 network-libvirtd.nix diff --git a/network-libvirtd.nix b/network-libvirtd.nix new file mode 100644 index 0000000..b6fe7dd --- /dev/null +++ b/network-libvirtd.nix @@ -0,0 +1,30 @@ +{ + bitcoin-node = + { config, pkgs, ... }: + { + deployment.targetEnv = "libvirtd"; + deployment.libvirtd.memorySize = 8192; # megabytes + deployment.libvirtd.vcpu = 4; # number of cpus + deployment.libvirtd.headless = true; + deployment.libvirtd.baseImageSize = 400; + boot.kernelParams = [ "console=ttyS0,115200" ]; + deployment.libvirtd.extraDevicesXML = '' + + + + + + + ''; + # Remove when fixed: https://github.com/NixOS/nixops/issues/931 + system.activationScripts.nixops-vm-fix-931 = { + text = '' + if ls -l /nix/store | grep sudo | grep -q nogroup; then + mount -o remount,rw /nix/store + chown -R root:nixbld /nix/store + fi + ''; + deps = []; + }; + }; +}