diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-11-25 15:59:05 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2019-11-25 15:59:05 -0500 |
commit | f191360ad051fc1bc153fb5193ed14820b99aa84 (patch) | |
tree | 322ec8fe6301372bb6a95428e3555faf41bdaf5c /nixos/modules/virtualisation | |
parent | 64396d112a5d9c920826c6e035d9fed66b17ac23 (diff) | |
parent | 06a054e6eb9d5ad395aa89e598205aa2c56afb61 (diff) | |
download | nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar.gz nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar.bz2 nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar.lz nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar.xz nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.tar.zst nixlib-f191360ad051fc1bc153fb5193ed14820b99aa84.zip |
Merge remote-tracking branch 'upstream/staging-next' into staging
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/openvswitch.nix | 13 | ||||
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 691ee2c136ec..09678ce9ea71 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -149,7 +149,7 @@ let --setenv PATH="$PATH" \ ${optionalString cfg.ephemeral "--ephemeral"} \ ${if cfg.additionalCapabilities != null && cfg.additionalCapabilities != [] then - ''--capability="${concatStringsSep " " cfg.additionalCapabilities}"'' else "" + ''--capability="${concatStringsSep "," cfg.additionalCapabilities}"'' else "" } \ ${if cfg.tmpfs != null && cfg.tmpfs != [] then ''--tmpfs=${concatStringsSep " --tmpfs=" cfg.tmpfs}'' else "" diff --git a/nixos/modules/virtualisation/openvswitch.nix b/nixos/modules/virtualisation/openvswitch.nix index edec37402308..6b8ad83661fe 100644 --- a/nixos/modules/virtualisation/openvswitch.nix +++ b/nixos/modules/virtualisation/openvswitch.nix @@ -42,6 +42,9 @@ in { default = false; description = '' Whether to start racoon service for openvswitch. + Supported only if openvswitch version is less than 2.6.0. + Use <literal>virtualisation.vswitch.package = pkgs.openvswitch-lts</literal> + for a version that supports ipsec over GRE. ''; }; }; @@ -89,6 +92,13 @@ in { "${cfg.package}/share/openvswitch/vswitch.ovsschema" fi chmod -R +w /var/db/openvswitch + if ${cfg.package}/bin/ovsdb-tool needs-conversion /var/db/openvswitch/conf.db | grep -q "yes" + then + echo "Performing database upgrade" + ${cfg.package}/bin/ovsdb-tool convert /var/db/openvswitch/conf.db + else + echo "Database already up to date" + fi ''; serviceConfig = { ExecStart = @@ -133,7 +143,7 @@ in { }; } - (mkIf cfg.ipsec { + (mkIf (cfg.ipsec && (versionOlder cfg.package.version "2.6.0")) { services.racoon.enable = true; services.racoon.configPath = "${runDir}/ipsec/etc/racoon/racoon.conf"; @@ -172,5 +182,4 @@ in { ''; }; })])); - } diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index e313d2b411bb..31d332e9f07a 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -620,7 +620,7 @@ in # Wireless won't work in the VM. networking.wireless.enable = mkVMOverride false; - networking.connman.enable = mkVMOverride false; + services.connman.enable = mkVMOverride false; # Speed up booting by not waiting for ARP. networking.dhcpcd.extraConfig = "noarp"; |